:root {
    --primary: #4B0082;
    --primary-light: #6A0DAD;
    --background: #fcfcfc;
    --text: #4B0082;
    --text-light: #6A0DAD;
    --gradient-1: linear-gradient(135deg, rgba(75, 0, 130, 0.9), rgba(106, 13, 173, 0.9));
    --gradient-2: linear-gradient(45deg, rgba(75, 0, 130, 0.8), rgba(106, 13, 173, 0.8));
    --glow: 0 0 10px rgba(106, 13, 173, 0.3);
    --accent-1: #FF6B6B;
    --accent-2: #4ECDC4;
}

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

html {
    overflow-x: hidden;
    height: 100%;
}

@media (min-width: 769px) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    background-color: var(--background);
    background-image: 
        linear-gradient(rgba(106, 13, 173, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(106, 13, 173, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    color: var(--text);
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100%;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 0% 0%, rgba(106, 13, 173, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(75, 0, 130, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Mobile-first responsive design */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* About Section */
.about {
    padding: 100px 20px;
    background: var(--background);
    opacity: 1;
    position: relative;
}

.about > p {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 50px;
    color: var(--text);
    max-width: 1200px;
    margin: 0 auto 50px;
    position: relative;
    text-shadow: var(--glow);
    letter-spacing: 0.5px;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 1;
}

.about-item {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(75, 0, 130, 0.1);
    border: 1px solid rgba(75, 0, 130, 0.1);
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@media (min-width: 769px) {
    .about-item {
        backdrop-filter: blur(10px);
    }
}

.about-item::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(106, 13, 173, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: transform 0.6s;
    pointer-events: none;
}

.about-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(75, 0, 130, 0.15),
                inset 0 0 30px rgba(75, 0, 130, 0.08);
}

.about-item:hover::after {
    transform: rotate(45deg) translate(50%, 50%);
}

.about-item h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    position: relative;
    display: inline-block;
}

.about-item h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

.about-item:hover h3::after {
    width: 100%;
}

.about-item p {
    color: var(--text);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .about {
        padding: 40px 15px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .about > p {
        font-size: 1.1rem;
        padding: 0 10px;
        margin-bottom: 30px;
    }
}

/* Optimize animations for mobile */
@media (prefers-reduced-motion: reduce) {
    .about::before {
        animation: none;
    }
}

/* Use hardware acceleration selectively */
.about-item,
.project-card,
.membership-card {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

/* Navigation */
.nav-container {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: var(--background);
    box-shadow: 0 2px 10px rgba(75, 0, 130, 0.1);
    transform: translateZ(0);
    opacity: 1;
    height: 70px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    transition: all 0.3s ease;
}

.logo {
    position: relative;
    transition: all 0.3s ease;
    height: 35px;
    display: flex;
    align-items: center;
    margin-top: -2px;
}

.logo-img {
    height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1002;
    }
    
    .nav-container {
        padding: 15px;
    }
    
    .logo {
        font-size: 1.5rem;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.5rem;
        transition: all 0.3s ease;
        opacity: 0;
        visibility: hidden;
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
        opacity: 1;
        visibility: visible;
    }

    .nav-links a {
        font-size: 1.4rem;
        font-weight: 500;
        padding: 10px 20px;
    }

    .hamburger.active span:first-child {
        transform: rotate(45deg) translate(8px, 7px);
    }

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

    .hamburger.active span:last-child {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1.2rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-light);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-light);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    transform: translateZ(0); /* Force GPU acceleration */
    will-change: transform, opacity;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: 
        radial-gradient(circle at 10% 20%, rgba(106, 13, 173, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(75, 0, 130, 0.03) 0%, transparent 20%),
        var(--background);
    margin-top: -70px; /* Match new nav height */
    padding-top: 70px; /* Match new nav height */
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(106, 13, 173, 0.2) 50%, 
        transparent 100%
    );
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 0;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: translateY(-40px); /* Adjust content up slightly to visually center */
}

.hero-content h1 {
    opacity: 1;
    margin-bottom: 1rem;
}

.subtitle-text {
    font-family: 'Quicksand', sans-serif;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    font-weight: 300;
    letter-spacing: 2px;
    color: var(--primary);
    position: relative;
    opacity: 1;
    margin: 1.5rem auto;
    padding: 0;
    width: 100%;
    text-align: center;
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 
        0 0 1px rgba(106, 13, 173, 0.1),
        0 0 2px rgba(106, 13, 173, 0.05);
    transform: translateZ(0);
    display: block;
    left: 50%;
    transform: translateX(-50%);
    position: absolute;
}

.subtitle-container {
    width: 100%;
    position: relative;
    height: 4rem;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Add subtle gradient backgrounds to sections */
section {
    position: relative;
    background: linear-gradient(
        rgba(250, 250, 250, 0.8) 0%,
        rgba(255, 255, 255, 0.9) 50%,
        rgba(250, 250, 250, 0.8) 100%
    );
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(106, 13, 173, 0.1) 50%, 
        transparent 100%
    );
}

.glitch-text {
    font-size: clamp(3rem, 8vw, 5rem);
    color: var(--primary-light);
    text-transform: uppercase;
    position: relative;
    letter-spacing: 0.1em;
    font-weight: 700;
    transform: translateZ(0); /* Force GPU acceleration */
    text-shadow: 
        0 0 5px rgba(106, 13, 173, 0.3),
        0 0 10px rgba(106, 13, 173, 0.2),
        0 0 20px rgba(106, 13, 173, 0.1),
        2px 2px 0 rgba(75, 0, 130, 1),
        -1px -1px 0 rgba(255, 255, 255, 0.5);
    -webkit-text-stroke: 2px rgba(106, 13, 173, 0.8);
}

.ai-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Projects Section */
.projects {
    padding: 100px 20px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
    padding: 0 5%;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
}

.project-card {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(75, 0, 130, 0.1);
    border: 1px solid rgba(75, 0, 130, 0.1);
    position: relative;
}

@media (min-width: 769px) {
    .project-card {
        backdrop-filter: blur(10px);
    }
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(106, 13, 173, 0.2);
}

@media (max-width: 768px) {
    .project-card {
        padding: 20px;
    }
    
    .project-card:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(75, 0, 130, 0.1);
    }
}

/* Ensure all sections are visible immediately */
[data-scroll-section] {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
}

/* Smooth fade in animation for sections and cards */
.visible {
    opacity: 1 !important;
}

.project-image {
    height: 200px;
    border-radius: 10px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

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

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

.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(106, 13, 173, 0.8), rgba(75, 0, 130, 0.8));
    opacity: 0.8;
}

.project-card h3 {
    color: var(--primary-light);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.project-card p {
    color: var(--text);
    margin-bottom: 25px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.view-project-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 10px 25px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: auto;
}

.view-project-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 13, 173, 0.3);
}

.view-all-projects {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(106, 13, 173, 0.3);
    }

.tech-stack {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.tech-stack span {
    background: rgba(106, 13, 173, 0.1);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    color: var(--text);
    border: 1px solid rgba(106, 13, 173, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: nowrap;
    margin-bottom: 8px;
}

@media (min-width: 769px) {
    .tech-stack span:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(106, 13, 173, 0.15);
        border-color: rgba(106, 13, 173, 0.5);
    }
}

@media (max-width: 768px) {
    .tech-stack {
        gap: 8px;
    }
    
    .tech-stack span {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Join Us Section */
.join-us {
    padding: 100px 20px;
    background: var(--background);
    opacity: 1;
    transform: translateZ(0); /* Force GPU acceleration */
}

.membership-types {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    padding: 0 20px;
    opacity: 1;
    transform: translateZ(0); /* Force GPU acceleration */
    flex-wrap: wrap;
}

@media (max-width: 1200px) {
    .membership-types {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .membership-types {
        flex-direction: column;
        gap: 30px;
        align-items: center;
    }
}

.membership-card {
    flex: 1;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.98);
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(75, 0, 130, 0.1);
    border: 1px solid rgba(75, 0, 130, 0.1);
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@media (min-width: 769px) {
    .membership-card {
        backdrop-filter: blur(10px);
    }
}

@media (max-width: 768px) {
    .membership-card {
        padding: 25px;
        margin: 0 15px;
    }
}

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

@media (max-width: 768px) {
    .membership-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(75, 0, 130, 0.1);
    }
}

.card-content h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.card-content p {
    margin-bottom: 20px;
    color: var(--text);
}

.card-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.card-content ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
    color: var(--text);
}

.card-content ul li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-light);
    transition: all 0.3s ease;
    transform-origin: center;
}

.card-content ul li:hover:before {
    transform: scale(1.2) translateX(2px);
    text-shadow: 0 0 8px rgba(106, 13, 173, 0.4);
}

.apply-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    margin-top: 20px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

@media (min-width: 769px) {
    .membership-card:hover .apply-button {
        transform: translateY(-2px);
        background: var(--primary-light);
        box-shadow: 0 5px 15px rgba(106, 13, 173, 0.3);
    }
}

@media (max-width: 768px) {
    .apply-button {
        padding: 10px 20px;
        width: 100%;
        text-align: center;
    }
    
    .membership-card:hover .apply-button {
        background: var(--primary-light);
    }
}


/* Section Headers */
section h2 {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-light) 50%,
        transparent 100%
    );
    transform: scaleX(0.7);
    opacity: 0.5;
}

section h2::before {
    content: attr(data-text);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: var(--primary-light);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.1;
    filter: blur(8px);
    z-index: -1;
}

/* Animations removed for better performance */
