/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* GSAP Animation Optimization */
.gsap-element {
    will-change: transform, opacity;
}

.gsap-element.animating {
    will-change: transform, opacity, filter;
}

/* Ensure sections are visible by default */
.achievements, .experience, .contact {
    opacity: 1 !important;
    visibility: visible !important;
}

.achievement-card, .timeline-item, .contact-form, .form-group {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Smooth hardware acceleration for animations */
.hero, .navbar, .project-card, .achievement-card, .timeline-item {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

:root {
    --primary-color: #7c3aed;
    --secondary-color: #a855f7;
    --accent-color: #06d6a0;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --bg-primary: rgba(255, 255, 255, 0.95);
    --bg-secondary: rgba(248, 250, 252, 0.9);
    --bg-dark: #1f2937;
    --border-color: rgba(229, 231, 235, 0.7);
    --shadow-sm: 0 1px 2px 0 rgba(124, 58, 237, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(124, 58, 237, 0.15), 0 2px 4px -1px rgba(124, 58, 237, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(124, 58, 237, 0.2), 0 4px 6px -2px rgba(124, 58, 237, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(124, 58, 237, 0.25), 0 10px 10px -5px rgba(124, 58, 237, 0.15);
}

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
    transform: scaleY(1.1);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.1);
}

/* Firefox Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(255, 255, 255, 0.1);
}

/* Enhanced scrollbar for dark backgrounds */
body {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    scroll-behavior: smooth;
}

/* Smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}

/* Enhanced scrollbar for specific containers */
.hero, .about, .skills, .projects, .achievements, .experience, .contact {
    scroll-margin-top: 80px; /* Account for fixed navbar */
}

/* Scrollbar track enhancement */
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Scrollbar button/arrows */
::-webkit-scrollbar-button {
    display: none;
}

/* Mobile scroll indicators */
@supports (-webkit-overflow-scrolling: touch) {
    body {
        -webkit-overflow-scrolling: touch;
    }
}

/* Custom scroll progress indicator */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.3s ease;
}

/* Responsive scrollbar styles */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .scroll-progress {
        height: 2px;
    }
}

@media (max-width: 480px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        border-radius: 4px;
        border: none;
    }
    
    .scroll-progress {
        height: 2px;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(125% 125% at 50% 100%, #fff 35%, #f8f9ff 45%, #e8e5ff 60%, #7c3aed 100%);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    transform: translateZ(0); /* Force hardware acceleration */
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    position: relative;
    width: 100%;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: transparent;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.01" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: var(--text-primary);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.typing-text {
    display: inline-block;
}

#dynamic-text {
    border-right: 3px solid var(--primary-color);
    padding-right: 5px;
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative;
    z-index: 10;
    margin-top: 2rem;
    justify-content: flex-start;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 214, 160, 0.3);
    border: 2px solid transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 214, 160, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 
        0 1px 2px rgba(124, 58, 237, 0.6),
        0 0 4px rgba(168, 85, 247, 0.4),
        1px 1px 0 rgba(124, 58, 237, 0.3),
        -1px -1px 0 rgba(124, 58, 237, 0.3);
    box-shadow: 
        0 4px 15px rgba(255, 255, 255, 0.1),
        0 8px 32px rgba(124, 58, 237, 0.3),
        0 2px 8px rgba(168, 85, 247, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: white;
    transform: translateY(-2px);
    text-shadow: 
        0 2px 4px rgba(124, 58, 237, 0.8),
        0 0 6px rgba(168, 85, 247, 0.6),
        1px 1px 0 rgba(124, 58, 237, 0.4),
        -1px -1px 0 rgba(124, 58, 237, 0.4);
    box-shadow: 
        0 8px 25px rgba(255, 255, 255, 0.2),
        0 12px 40px rgba(124, 58, 237, 0.4),
        0 4px 16px rgba(168, 85, 247, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.profile-image img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(255, 255, 255, 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* Section Styles */
section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 4rem;
    position: relative;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* About Section */
.about {
    background: transparent;
    position: relative;
    z-index: 10;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
}

.about-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.about-img-container img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.about-img-container:hover img {
    transform: scale(1.05);
}

/* Skills Section */
.skills {
    background: transparent;
    position: relative;
    z-index: 10;
    padding: 100px 0;
}

/* Skills Grid for Desktop */
.skills-grid {
    display: none;
}

@media (min-width: 769px) {
    .skills-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 2.5rem;
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 40px;
        justify-items: center;
        align-items: start;
    }
    
    .card-stack-container.skills-stack {
        display: none;
    }
}

@media (max-width: 768px) {
    .skills-grid {
        display: none;
    }
    
    .card-stack-container.skills-stack {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Add extra padding to skills section on mobile */
    .skills {
        padding: 80px 0 120px 0;
    }
}

.skill-category-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 350px;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

.skill-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.skill-category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(124, 58, 237, 0.3);
}

.skill-category-card:hover::before {
    opacity: 1;
}

.skill-category-card h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Improved Card Stack Styles */
.card-stack {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 500px;
    margin: 0 auto;
    perspective: 1000px;
    touch-action: none; /* Prevent default touch behaviors */
}

.stack-card {
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center bottom;
    will-change: transform, opacity;
}

.stack-card:active {
    cursor: grabbing;
}

/* Remove the nth-child CSS rules and let JavaScript handle positioning */
.stack-card:not(.swiped-left):not(.swiped-right):not(.swiped-up) {
    pointer-events: none;
}

.stack-card:first-child:not(.swiped-left):not(.swiped-right):not(.swiped-up) {
    pointer-events: auto;
}

.stack-card:hover:first-child {
    transform: translateY(-5px) scale(1.02) !important;
}

/* Swipe animation classes */
.stack-card.swiped-left,
.stack-card.swiped-right,
.stack-card.swiped-up {
    pointer-events: none;
    z-index: 1 !important;
}


.swipe-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    animation: pulse-hint 2s infinite;
    text-align: center;
    margin: 0;
    position: relative;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.swipe-hint i {
    color: var(--primary-color);
}

/* Stack Indicators Container */
.stack-indicators {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    position: relative;
    z-index: 10;
    min-height: 60px; /* Ensure minimum space */
    width: 100%;
    clear: both; /* Ensure it appears below the card stack */
}

.stack-counter {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(124, 58, 237, 0.2);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.1);
    white-space: nowrap; /* Prevent text wrapping */
}

/* Ensure proper spacing between card stack and indicators */
.card-stack-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 2rem; /* Extra bottom padding */
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Force stack indicators to be at the bottom */
.card-stack-container .card-stack {
    margin-bottom: 0; /* Remove any bottom margin from card stack */
}

.card-stack-container .stack-indicators {
    margin-top: 2rem;
    flex-shrink: 0; /* Prevent shrinking */
}

.skill-category {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.skill-category:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.skill-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(124, 58, 237, 0.3);
}

.skill-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.skill-item:hover i {
    transform: scale(1.1);
    color: var(--secondary-color);
}

.skill-item span {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    font-weight: 500;
}

/* Projects Section */
.projects {
    background: transparent;
    position: relative;
    z-index: 10;
    padding: 100px 0;
}

/* Projects Grid for Desktop */
.projects-grid {
    display: none;
}

@media (min-width: 769px) {
    .projects-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 2.5rem;
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 40px;
        justify-items: center;
        align-items: start;
    }
    
    .card-stack-container.projects-stack {
        display: none;
    }
}

@media (max-width: 768px) {
    .projects-grid {
        display: none;
    }
    
    .card-stack-container.projects-stack {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    /* Add extra padding to projects section on mobile */
    .projects {
        padding: 80px 0 120px 0;
    }
}

.project-grid-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    min-height: 400px;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

.project-grid-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.project-grid-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(124, 58, 237, 0.3);
}

.project-grid-card:hover::before {
    opacity: 1;
}

.project-grid-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.project-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-grid-card:hover .project-grid-image img {
    transform: scale(1.1);
}

.project-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(124, 58, 237, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-grid-card:hover .project-grid-overlay {
    opacity: 1;
}

.project-grid-links {
    display: flex;
    gap: 1rem;
}

.project-grid-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.project-grid-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.project-grid-content {
    padding: 1.5rem;
}

.project-grid-content h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.project-grid-content p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.project-grid-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-grid-tech span {
    background: rgba(124, 58, 237, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(124, 58, 237, 0.2);
}

.projects-stack .card-stack {
    max-width: 450px;
    height: 600px;
}

.project-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-link:hover {
    transform: scale(1.1);
    background: var(--accent-color);
    color: white;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.project-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech span {
    background: var(--bg-secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Achievements Section */
.achievements {
    background: transparent;
    position: relative;
    z-index: 10;
    padding: 120px 0;
}

.achievements .section-title {
    margin-bottom: 4rem;
    font-size: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2.5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    justify-items: center;
    align-items: start;
}

.achievement-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    min-height: 320px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.achievement-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.2), rgba(168, 85, 247, 0.2));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.achievement-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 60px rgba(124, 58, 237, 0.3);
    border-color: rgba(124, 58, 237, 0.5);
}

.achievement-card:hover::before {
    opacity: 1;
}

.achievement-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.achievement-card:hover .achievement-icon {
    transform: scale(1.1);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.achievement-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.achievement-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
    opacity: 0.9;
}

/* Mobile responsiveness for achievements */
@media (max-width: 768px) {
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 20px;
    }
    
    .achievement-card {
        min-height: 280px;
        padding: 2rem;
        max-width: 100%;
    }
    
    .achievement-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .achievement-card h3 {
        font-size: 1.1rem;
    }
    
    .achievement-card p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .achievements-grid {
        gap: 1rem;
        padding: 0 10px;
    }
    
    .achievement-card {
        min-height: 220px;
        padding: 1.25rem;
    }
    
    .achievement-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}
.experience {
    background: transparent;
    position: relative;
    z-index: 10;
    overflow: hidden;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Animated Timeline Line */
.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, transparent 100%);
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: top;
    animation: drawLine 2s ease-out forwards;
    animation-delay: 0.5s;
}

/* Pencil Animation */
.pencil-container {
    position: absolute;
    left: 10px;
    top: -40px;
    z-index: 100;
    animation: pencilMove 3s ease-in-out forwards;
    animation-delay: 0.2s;
}

.pencil {
    position: relative;
    width: 40px;
    height: 8px;
    transform: rotate(45deg);
}

.pencil-tip {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-left: 8px solid #FFA500;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.pencil-body {
    position: absolute;
    left: 8px;
    top: 0;
    width: 25px;
    height: 8px;
    background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
    border-radius: 0 4px 4px 0;
}

.pencil-eraser {
    position: absolute;
    right: 0;
    top: 1px;
    width: 6px;
    height: 6px;
    background: #FF6B6B;
    border-radius: 50%;
}

/* Timeline Items */
.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    padding-left: 80px;
    opacity: 0;
    transform: translateX(30px);
    animation: slideInItem 0.6s ease-out forwards;
}

.timeline-item[data-index="0"] {
    animation-delay: 1.5s;
}

.timeline-item[data-index="1"] {
    animation-delay: 2.0s;
}

.timeline-item[data-index="2"] {
    animation-delay: 2.5s;
}

.timeline-dot {
    position: absolute;
    left: 20px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
    z-index: 10;
    opacity: 0;
    animation: popIn 0.4s ease-out forwards;
}

.timeline-item[data-index="0"] .timeline-dot {
    animation-delay: 1.7s;
}

.timeline-item[data-index="1"] .timeline-dot {
    animation-delay: 2.2s;
}

.timeline-item[data-index="2"] .timeline-dot {
    animation-delay: 2.7s;
}

.timeline-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 0;
    height: 0;
    border-right: 10px solid rgba(255, 255, 255, 0.9);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
}

/* Animations */
@keyframes drawLine {
    0% { transform: scaleY(0); }
    100% { transform: scaleY(1); }
}

@keyframes pencilMove {
    0% { 
        transform: translateY(0px) rotate(45deg);
        opacity: 1;
    }
    50% { 
        transform: translateY(200px) rotate(45deg);
        opacity: 1;
    }
    70% {
        transform: translateY(350px) rotate(45deg);
        opacity: 1;
    }
    90% {
        transform: translateY(500px) rotate(45deg);
        opacity: 0.7;
    }
    100% { 
        transform: translateY(600px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes slideInItem {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    70% {
        transform: scale(1.2);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.timeline-content h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.timeline-content h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
}

.timeline-content p {
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.6;
}

.timeline-content ul {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.timeline-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact {
    background: transparent;
    position: relative;
    z-index: 10;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--primary-color);
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 20px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
    opacity: 0.8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.contact-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.4);
}

/* Footer */
.footer {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(15px);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
        padding: 0 60px;
    }
    
    .hero-container {
        max-width: 1400px;
    }
    
    .card-stack {
        max-width: 450px;
        height: 550px;
    }
    
    .projects-stack .card-stack {
        max-width: 500px;
        height: 650px;
    }
}

@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    .section-title {
        font-size: 2.4rem;
        margin-bottom: 3.5rem;
    }
    
    .hero-container {
        gap: 3rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .contact-content {
        gap: 3rem;
    }
    
    .card-stack {
        max-width: 380px;
        height: 480px;
    }
    
    .projects-stack .card-stack {
        max-width: 400px;
        height: 500px;
    }

    /* Adjust stack indicators for tablet */
    .stack-indicators {
        margin-top: 1.5rem;
        gap: 0.8rem;
    }
    
    .stack-counter {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .swipe-hint {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        box-shadow: 0 8px 32px rgba(124, 58, 237, 0.15);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-toggle {
        display: flex;
        position: relative;
        z-index: 1001;
    }

    .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);
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        justify-content: center;
        flex-wrap: wrap;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        padding-left: 60px;
    }

    .timeline-dot {
        left: 10px;
    }
    
    /* Pencil animation adjustments for mobile */
    .pencil-container {
        left: 0px;
        top: -30px;
    }
    
    .pencil {
        width: 30px;
        height: 6px;
    }
    
    .pencil-tip {
        border-left: 6px solid #FFA500;
        border-top: 3px solid transparent;
        border-bottom: 3px solid transparent;
    }
    
    .pencil-body {
        left: 6px;
        width: 20px;
        height: 6px;
    }
    
    .pencil-eraser {
        width: 5px;
        height: 5px;
        top: 0.5px;
    }
    
    /* Adjust pencil animation path for mobile */
    @keyframes pencilMove {
        0% { 
            transform: translateY(0px) rotate(45deg);
            opacity: 1;
        }
        50% { 
            transform: translateY(120px) rotate(45deg);
            opacity: 1;
        }
        70% {
            transform: translateY(200px) rotate(45deg);
            opacity: 1;
        }
        90% {
            transform: translateY(280px) rotate(45deg);
            opacity: 0.7;
        }
        100% { 
            transform: translateY(320px) rotate(45deg);
            opacity: 0;
        }
    }

    /* Card stack responsive adjustments */
    .card-stack {
        max-width: 320px;
        height: 400px;
    }
    
    .projects-stack .card-stack {
        max-width: 340px;
        height: 450px;
    }
    
    /* Stack indicators mobile adjustments */
    .stack-indicators {
        margin-top: 1.5rem;
        gap: 1rem;
    }
    
    .swipe-hint {
        font-size: 0.9rem;
    }
    
    .stack-counter {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
    
    .container {
        padding: 0 25px;
    }
    
    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }
    
    .achievement-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .skill-items {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.8rem;
    }
    
    .skill-item {
        padding: 0.8rem;
    }
    
    .skill-item i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 3rem;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        flex-wrap: wrap;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 0.9rem;
        min-width: 160px;
        white-space: nowrap;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .skill-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .skill-item {
        padding: 0.6rem;
    }
    
    .skill-item i {
        font-size: 1.3rem;
        margin-bottom: 0.3rem;
    }
    
    .skill-item span {
        font-size: 0.8rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .stat h3 {
        font-size: 2rem;
    }
    
    .achievement-card {
        padding: 1.5rem;
    }
    
    .achievement-card h3 {
        font-size: 1.1rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .timeline-content h3 {
        font-size: 1.1rem;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .contact-item {
        padding: 0.8rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    /* Card stack adjustments for very small screens */
    .card-stack {
        max-width: 280px;
        height: 360px;
    }
    
    .projects-stack .card-stack {
        max-width: 300px;
        height: 400px;
    }
    
    .project-card,
    .skill-category {
        padding: 1rem;
    }
    
    .project-card h3,
    .skill-category h3 {
        font-size: 1rem;
    }
    
    .project-card p,
    .skill-category p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Stack indicators for very small screens */
    .stack-indicators {
        margin-top: 1rem;
        gap: 0.8rem;
    }
    
    .swipe-hint {
        font-size: 0.8rem;
    }
    
    .stack-counter {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Navigation adjustments */
    .nav-container {
        padding: 0.8rem 15px;
    }
    
    .nav-logo a {
        font-size: 1.3rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem;
    }
}

/* Enhanced Animation Classes for GSAP */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* GSAP Specific Animation Classes */
.gsap-fade-in {
    opacity: 0;
}

.gsap-slide-up {
    opacity: 0;
    transform: translateY(50px);
}

.gsap-slide-left {
    opacity: 0;
    transform: translateX(-50px);
}

.gsap-slide-right {
    opacity: 0;
    transform: translateX(50px);
}

.gsap-scale {
    opacity: 0;
    transform: scale(0.8);
}

.gsap-rotate {
    opacity: 0;
    transform: rotate(10deg);
}

/* Enhanced hover states for GSAP */
.gsap-hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gsap-hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Improved performance for animated elements */
.animated-element {
    will-change: transform, opacity;
    transform: translateZ(0);
}

.animated-element.animation-complete {
    will-change: auto;
}


