body.index-page {
    background: #1a1a1a;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: rgba(255, 255, 255, 0.9);
}

.index-page .page-container {
    background: transparent;
    position: relative;
    isolation: isolate;
}

.index-page .content-wrap {
    background: transparent;
    position: relative;
    z-index: 1;
}

/* Ambient background effect */
.index-page .content-wrap::after {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 0% 0%, rgba(74, 158, 255, 0.15), transparent 50%),
        radial-gradient(circle at 100% 0%, rgba(159, 122, 234, 0.15), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(72, 187, 120, 0.15), transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(237, 100, 166, 0.15), transparent 50%);
    background-color: #1a1a1a;
    z-index: -1;
    animation: gradientFlow 20s ease-in-out infinite alternate;
    margin-top: -200px;
}

/* Distinctive hero section with interactive elements */
.hero-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 50%, #3498db 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(74, 158, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Interactive hero background with grid pattern */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.1) 0%, transparent 60%),
        linear-gradient(to right, rgba(74, 158, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(to bottom, rgba(74, 158, 255, 0.05) 1px, transparent 1px) 0 0 / 40px 40px;
    animation: pulse 10s infinite;
    z-index: -1;
}

/* Hero content styling with enhanced profile image effect */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.profile-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    object-position: center;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 0 0 4px rgba(74, 158, 255, 0.3),
        0 0 25px rgba(74, 158, 255, 0.5);
    margin-bottom: 30px;
    transition: all 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

.profile-image:hover {
    transform: scale(1.05) rotate(-5deg);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 0 4px rgba(74, 158, 255, 0.5),
        0 0 35px rgba(74, 158, 255, 0.7);
}

/* Enhanced text styling for hero section */
.hero-content h1.display-4 {
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.hero-content h1.display-4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff, #ffffff, #4a9eff);
    border-radius: 3px;
    transition: width 0.6s ease;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
}

.hero-content:hover h1.display-4::after {
    width: 120px;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
}

.hero-content .lead {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    font-size: 1.25rem;
    font-weight: 400;
    margin-top: 1rem;
}

/* Main content styling */
.main-content {
    position: relative;
    z-index: 2;
    padding: 0;
}

/* Section styling */
.section-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
    font-size: 2.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.8), transparent);
    border-radius: 3px;
    width: 60px;
    left: 0;
    transform-origin: left;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.section-title:hover::after {
    transform: scaleX(1.5);
    opacity: 0.9;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.8), transparent);
    transform-origin: center;
    transition: width 0.4s ease, opacity 0.4s ease;
}

.text-center .section-title:hover::after {
    width: 100px;
    opacity: 1;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.4);
}

/* Intro section with glass panels */
.intro-section {
    margin: 2rem 0 !important;
    padding: 1rem !important;
}

.glass-panel {
    background: rgba(40, 45, 60, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.intro-text {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.intro-text::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(74, 158, 255, 0.1),
        transparent
    );
    top: -50%;
    left: -50%;
    transform: rotate(35deg);
    animation: shine 6s infinite linear;
    z-index: -1;
}

.accent-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #4a9eff, transparent);
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    border-radius: 3px;
}

.accent-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shimmer 2s infinite;
}

.callout-box {
    background: rgba(74, 158, 255, 0.1);
    border-left: 4px solid #4a9eff;
    padding: 1.5rem;
    margin: 2rem 0 0;
    border-radius: 0 10px 10px 0;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-accent {
    font-size: 2rem;
    color: #4a9eff;
    opacity: 0.8;
}

/* Tech stack hexagon grid */
.tech-stack-container {
    background: rgba(40, 45, 60, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stack-title {
    color: white;
    margin-bottom: 2rem;
    font-weight: 600;
    text-align: center;
    position: relative;
}

.stack-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.8), transparent);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55), background 0.4s ease;
}

.stack-title:hover::after {
    width: 80px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

.hexagon-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.hexagon-wrapper {
    position: relative;
    width: 80px;
    height: 92px;
    transition: all 0.3s ease;
}

/* Animate the icon inside the hexagon on hover */
.hexagon:hover .tech-icon {
    animation: jump 0.5s cubic-bezier(.25,1.5,.5,1) 1;
}

@keyframes jump {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-18px); }
    50%  { transform: translateY(-10px); }
    70%  { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

.hexagon {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hexagon:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 20px rgba(74, 158, 255, 0.3);
}

/* Featured section with dynamic grid - UPDATED */
.featured-section {
    margin: 4rem 0;
    padding: 0; /* Remove default padding */
    background: transparent; /* Remove background */
}

.featured-section-container {
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
}

.featured-section-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(74, 158, 255, 0.1),
        transparent
    );
    top: -50%;
    left: -50%;
    transform: rotate(35deg);
    animation: shine 6s infinite linear;
    z-index: 0;
    pointer-events: none;
}

.featured-section .section-title {
    position: relative;
    z-index: 1;
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(6, 80px);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Rest of feature grid styles remain the same */
.feature-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    background: rgba(40, 45, 60, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    cursor: pointer;
}

.projects-card { grid-area: 1 / 1 / 5 / 7; }
.education-card { grid-area: 1 / 7 / 3 / 13; }
.skills-card { grid-area: 3 / 7 / 5 / 13; }
.contact-card { grid-area: 5 / 1 / 7 / 13; }

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

.feature-content {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-icon {
    /* Ensure the icon container is always perfectly round and not squished */
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
    background: rgba(74, 158, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    aspect-ratio: 1/1 !important;
    flex-shrink: 0;
    flex-grow: 0;
    box-sizing: border-box;
    align-self: flex-start;
}

.feature-icon i {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.9);
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1/1;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background: rgba(74, 158, 255, 0.3);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.feature-card p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.feature-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(74, 158, 255, 0.15),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.projects-card:hover .feature-bg { opacity: 1; }
.education-card:hover .feature-bg { opacity: 1; }
.skills-card:hover .feature-bg { opacity: 1; }
.contact-card:hover .feature-bg { opacity: 1; }

.btn-glow {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #4a9eff, #3b7fd1);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
    transform-origin: left center;
    width: auto;
}

.btn-glow i {
    transition: all 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 158, 255, 0.3);
}

.btn-glow:hover i {
    transform: translateX(5px);
}

/* Timeline section styling */
.timeline-section {
    padding: 4rem 0 6rem;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 10px;
    width: 1px;
    background: linear-gradient(to bottom, rgba(74, 158, 255, 0.4), rgba(74, 158, 255, 0.1));
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a9eff;
    box-shadow: 0 0 10px rgba(74, 158, 255, 0.5);
    z-index: 1;
}

.timeline-content {
    background: rgba(40, 45, 60, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.timeline-content h4 {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.timeline-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.timeline-item:hover .timeline-content {
    transform: translateX(10px);
    background: rgba(40, 45, 60, 0.6);
}

.timeline-item:hover .timeline-marker {
    transform: scale(1.2);
}

/* Button styles */
.btn-outline-primary {
    background: transparent;
    border: 1px solid #4a9eff;
    color: #4a9eff;
}

.btn-outline-primary:hover {
    background: #4a9eff;
    color: white;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(35deg); }
    100% { transform: translateX(100%) rotate(35deg); }
}

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

@keyframes scanning {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

/* Add scanning line effect */
.content-wrap::before {
    content: "";
    position: fixed;
    top: -2px; /* Start slightly above viewport */
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(74, 158, 255, 0.2);
    animation: scanning 8s linear 1 forwards; /* Run only once and keep final state */
    pointer-events: none;
    z-index: 1000;
}

/* Section title underlines - standard size */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    height: 3px;
    background: linear-gradient(90deg, rgba(74, 158, 255, 0.8), transparent);
    border-radius: 3px;
    width: 60px;
    left: 0;
    transform-origin: left;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* Text-center section titles */
.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.8), transparent);
    transform-origin: center;
    transition: width 0.4s ease, opacity 0.4s ease;
}

/* Longer underlines for specific section titles */
.intro-text .section-title::after {
    width: 120px; /* Longer underline for "Welcome to My Portfolio" */
}

.featured-section .section-title::after {
    width: 150px; /* Longer underline for "Explore My Work" */
}

.timeline-section .section-title::after {
    width: 100px; /* Longer underline for "At a Glance" */
}

/* Hover effects for longer underlines */
.intro-text:hover .section-title::after {
    transform: scaleX(1.2); /* Scale effect on hover */
    opacity: 0.9;
}

.featured-section:hover .section-title::after {
    width: 180px; /* Width grows on hover */
    opacity: 1;
    box-shadow: 0 0 15px rgba(74, 158, 255, 0.5);
}

.timeline-section:hover .section-title::after {
    transform: scaleX(1.2); /* Scale effect on hover */
    opacity: 0.9;
}

/* Responsive styles */
@media (min-width: 992px) {
    .content-wrap,
    .container,
    .hero-section,
    .hero-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .tech-stack-container {
        margin-top: 0 !important;
    }
    .intro-text,
    .intro-section .glass-panel {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
}

@media (max-width: 992px) {
    .feature-grid {
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: repeat(8, 80px);
    }
    
    .projects-card { grid-area: 1 / 1 / 3 / 7; }
    .education-card { grid-area: 3 / 1 / 5 / 7; }
    .skills-card { grid-area: 5 / 1 / 7 / 7; }
    .contact-card { grid-area: 7 / 1 / 9 / 7; }
    
    .intro-section .row {
        flex-direction: column;
    }
    
    .intro-text, .tech-stack-container {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .content-wrap,
    .container,
    .glass-panel,
    .tech-stack-container,
    .featured-section {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .hero-section {
        padding: 32px 0 !important;
    }
    .main-content {
        padding: 0 !important;
    }
    .section-title {
        font-size: 1.3rem !important;
        margin-bottom: 1.2rem !important;
    }
    .lead {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
    .callout-box {
        font-size: 0.95rem !important;
        padding: 1rem !important;
        gap: 1rem !important;
    }
    .glass-panel,
    .tech-stack-container {
        padding: 1rem !important;
    }
    .feature-card {
        padding: 1rem !important;
        min-height: 160px !important;
    }
    .timeline-content {
        padding: 1rem !important;
    }
    .hexagon-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    .feature-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .profile-image {
        width: 120px !important;
        height: 120px !important;
        margin-bottom: 18px !important;
    }
    .accent-line {
        margin: 1rem 0 !important;
    }
    .timeline-section {
        padding: 2rem 0 3rem !important;
    }
    .timeline-content h4 {
        font-size: 1.1rem !important;
    }
    .timeline-content p,
    .timeline-date {
        font-size: 0.95rem !important;
    }
    .intro-section {
        margin-top: 2.5rem !important; /* Add gap above intro section */
        margin-bottom: 2rem !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 576px) {
    .intro-section,
    .featured-section,
    .timeline-section {
        padding: 2rem 0;
    }
    .hexagon-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .glass-panel,
    .tech-stack-container {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}
    .timeline-content h4 {
        font-size: 1.1rem !important;
    }
    .timeline-content p,
    .timeline-date {
        font-size: 0.95rem !important;
    }
    .intro-section {
        margin-top: 2.5rem !important; /* Add gap above intro section */
        margin-bottom: 2rem !important;
        padding-top: 0 !important;
    }
}

@media (max-width: 576px) {
    .intro-section,
    .featured-section,
    .timeline-section {
        padding: 2rem 0;
    }
    
    .glass-panel,
    .tech-stack-container {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}
    .tech-stack-container {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}
