:root {
    --ai-primary: #ff9f1c; 
    --ai-secondary: #ffbf69;
    --ai-border: rgba(255, 159, 28, 0.2);
    --ai-glow: rgba(255, 159, 28, 0.15);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Cyber Grid Background */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(rgba(255, 159, 28, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 159, 28, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    mask-image: radial-gradient(circle at center, black, transparent 90%);
}

body.light-mode .cyber-grid {
    background: 
        linear-gradient(rgba(255, 159, 28, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 159, 28, 0.05) 1px, transparent 1px);
    opacity: 0.5;
}

.ai-hero {
    padding-top: 15rem;
    padding-bottom: 8rem;
    text-align: center;
    position: relative;
}

.ai-hero h1 {
    font-size: clamp(4.5rem, 9vw, 8.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    background: linear-gradient(135deg, #fff 30%, var(--ai-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.2));
}

body.light-mode .ai-hero h1 {
    background: linear-gradient(135deg, #182033 30%, var(--ai-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: none;
}

.ai-hero .subtitle {
    font-size: 1.9rem;
    color: var(--muted-text);
    max-width: 800px;
    margin: 0 auto;
    letter-spacing: 0.01em;
    line-height: 1.7;
}

/* Premium Lab Badge */
.lab-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 2rem;
    background: rgba(255, 159, 28, 0.1);
    border: 1px solid var(--ai-border);
    border-radius: 99px;
    color: var(--ai-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 1.15rem;
    margin-bottom: 3.5rem;
    backdrop-filter: blur(5px);
}

.lab-badge i {
    animation: rotate 4s linear infinite;
}

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

/* Glass Cards 2.0 */
.ai-card {
    background: var(--surface-color);
    border: 1px solid var(--ai-border);
    border-radius: 2.8rem;
    padding: 3.5rem;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

body.light-mode .ai-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 159, 28, 0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.ai-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 159, 28, 0.4);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3), 0 0 15px var(--ai-glow);
}

body.light-mode .ai-card:hover {
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

/* Featured Heading Fix */
#ai-projects .heading {
    margin-bottom: 8rem;
    font-size: clamp(3.2rem, 6vw, 5rem);
    line-height: 1.2;
    text-align: center;
}

#ai-projects .heading span {
    display: inline-block;
}

/* Project Layout Fix */
.ai-project-grid {
    display: grid;
    gap: 12rem;
    margin-top: 6rem;
}

.ai-project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.ai-project-visual {
    position: relative;
    border-radius: 2.4rem;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
    aspect-ratio: 16 / 9;
    background: var(--surface-strong);
}

body.light-mode .ai-project-visual {
    box-shadow: 0 20px 45px rgba(0,0,0,0.08);
}

.ai-project-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.ai-project-item:hover .ai-project-visual img {
    transform: scale(1.05);
}

/* Tech Pills */
.ai-tech-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.4rem;
    border-radius: 1rem;
    font-size: 1.3rem;
    color: var(--muted-text);
    display: inline-block;
    margin: 0.4rem;
}

body.light-mode .ai-tech-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
    color: #556176;
}

/* Custom Heading Underline */
.heading-accent {
    width: 70px;
    height: 3.5px;
    background: var(--ai-primary);
    margin: 2.5rem auto;
    border-radius: 2px;
    box-shadow: 0 0 12px var(--ai-primary);
}

/* Section Spacing */
section {
    padding: 10rem 0;
}

/* Responsive */
@media (max-width: 1024px) {
    .ai-project-item {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .ai-project-item:nth-child(even) .ai-project-visual {
        order: -1;
    }
    
    .ai-hero h1 {
        font-size: 4.5rem;
    }
}
