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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

:root {
    --primary: #6C63FF;
    --primary-dark: #554fd8;
    --secondary: #FF6584;
    --dark: #2D2B55;
    --light: #F8F9FA;
    --gray: #8A8AA3;
    --gradient: linear-gradient(135deg, #6C63FF 0%, #FF6584 100%);
    --gradient-dark: linear-gradient(135deg, #2D2B55 0%, #6C63FF 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--light);
    background: var(--gradient-dark);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

/* Global text alignment */
h1,
h2,
h3,
h4,
h5 {
    text-align: justify;
    text-justify: inter-word;
}

p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.8;
}

/* Animated Background */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.stars-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.star {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.9) 0%, transparent 70%);
    border-radius: 50%;
    animation: twinkle 3s ease-in-out infinite;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.bubbles-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bubble {
    position: absolute;
    bottom: -150px;
    background: radial-gradient(circle at 30% 30%, rgba(108, 99, 255, 0.2), rgba(255, 101, 132, 0.15));
    border-radius: 50%;
    opacity: 0.7;
    animation: floatUp linear infinite;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(108, 99, 255, 0.3);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(108, 99, 255, 0.2);
}

@keyframes floatUp {
    0% {
        bottom: -150px;
        transform: translateX(0) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 0.7;
        transform: translateX(calc(var(--drift) * 0.1)) rotate(36deg) scale(0.7);
    }

    50% {
        transform: translateX(calc(var(--drift) * 0.5)) rotate(180deg) scale(1);
    }

    90% {
        opacity: 0.7;
        transform: translateX(calc(var(--drift) * 0.9)) rotate(324deg) scale(0.8);
    }

    100% {
        bottom: 110vh;
        transform: translateX(var(--drift)) rotate(360deg) scale(0.5);
        opacity: 0;
    }
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    background: rgba(45, 43, 85, 0.9);
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    will-change: transform;
    transform: translateZ(0);
    isolation: isolate;
    overflow: visible;
}

.logo {
    display: flex;
    align-items: center;
    background: rgba(45, 43, 85, 0.9);
    padding: 0.3rem 0.8rem;
    border-radius: 10px;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(108, 99, 255, 0.3));
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    background: rgba(108, 99, 255, 0.15);
    transform: translateY(-2px);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

nav a:hover::after,
nav a.active::after {
    width: 80%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Sections */
section {
    min-height: 100vh;
    padding: 8rem 10% 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    isolation: isolate;
    contain: layout style paint;
}

/* Container */
.section-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 1.5rem;
}

.section-title {
    font-family: 'Raleway', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.section-title::after {
    content: '';
    width: 120px;
    height: 6px;
    background: var(--gradient);
    border-radius: 10px;
    margin-top: 1.5rem;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.6),
        0 0 40px rgba(108, 99, 255, 0.4),
        0 4px 15px rgba(0, 0, 0, 0.3);
    animation: pulse-line 2s ease-in-out infinite;
}

@keyframes pulse-line {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(108, 99, 255, 0.6),
            0 0 40px rgba(108, 99, 255, 0.4),
            0 4px 15px rgba(0, 0, 0, 0.3);
        transform: scaleX(1);
    }

    50% {
        box-shadow: 0 0 30px rgba(108, 99, 255, 0.8),
            0 0 60px rgba(108, 99, 255, 0.6),
            0 4px 20px rgba(0, 0, 0, 0.4);
        transform: scaleX(1.05);
    }
}

/* Home Section */
#home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3rem;
    z-index: 1;
    isolation: isolate;
}

.home-content {
    flex: 1;
    min-width: 300px;
    padding-right: 2rem;
    order: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-content h1 {
    text-align: center;
    width: 100%;
}

.home-content h2 {
    text-align: center;
    width: 100%;
}

.home-content p {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.home-content h1 {
    font-family: 'Raleway', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.home-content h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.home-content p {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.btn-container {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.profile-img-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    order: 2;
}

.profile-img {
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: var(--gradient);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(108, 99, 255, 0.4);
    border: 3px solid rgba(108, 99, 255, 0.5);
}

.profile-img::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: rotate 10s linear infinite;
}

.profile-img-inner {
    width: 94%;
    height: 94%;
    border-radius: 50%;
    background: var(--dark);
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.profile-img-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* About Section */
#about {
    background: rgba(45, 43, 85, 0.7);
}

.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.about-img-container {
    flex: 1;
    min-width: 300px;
}

.about-img-slideshow {
    width: 100%;
    max-width: 500px;
    height: 600px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.about-slide {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.about-slide.active {
    opacity: 1;
    z-index: 2;
}

.about-slide.dissolving {
    z-index: 3;
}

.dissolve-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
}

.about-content {
    flex: 1;
    min-width: 300px;
    text-align: justify;
    text-justify: inter-word;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    text-align: justify;
    text-justify: inter-word;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: justify;
    text-justify: inter-word;
}

/* Work Experience */
#work {
    background: rgba(108, 99, 255, 0.05);
    z-index: 1;
    isolation: isolate;
}

.work-timeline {
    position: relative;
    max-width: 1100px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.work-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gradient);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    margin-bottom: 4.5rem;
    position: relative;
    width: 50%;
    padding: 2.5rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    background: rgba(45, 43, 85, 0.8);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(108, 99, 255, 0.3);
    border-left: 4px solid var(--primary);
    position: relative;
    transition: all 0.3s ease;
    text-align: left;
}

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.3);
}

.timeline-content::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -45px;
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -45px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.timeline-content h4 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: left;
}

.work-location {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.work-location i {
    color: var(--secondary);
    font-size: 0.9rem;
}

.timeline-content ul {
    padding-left: 1.2rem;
}

.timeline-content li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: left;
}

/* Skills Section */
#skills {
    background: rgba(45, 43, 85, 0.7);
    z-index: 1;
    isolation: isolate;
}

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    align-items: stretch;
    justify-content: center;
    padding: 0 1rem;
}

.skill-card {
    background: rgba(108, 99, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(108, 99, 255, 0.3);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(108, 99, 255, 0.1);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.4);
    border-color: var(--primary);
    border-width: 2px;
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    text-align: left;
}

.skill-card i {
    color: var(--primary);
    font-size: 1.8rem;
}

.skill-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-start;
}

.skill-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-item:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* Education Section */
#education {
    background: rgba(108, 99, 255, 0.05);
    overflow-x: auto;
    overflow-y: visible;
    display: block;
    padding: 6rem 0 4rem;
    z-index: 1;
    isolation: isolate;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Hide scrollbar for all browsers */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

#education::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

#education .section-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#education .section-title {
    margin-left: 10%;
    margin-bottom: 4rem;
    text-align: left;
    width: auto;
    display: inline-flex;
    align-items: flex-start;
}

#education .section-title::after {
    display: none;
}

.education-timeline {
    position: relative;
    display: flex;
    gap: 3rem;
    padding: 3rem 10%;
    width: max-content;
    align-items: stretch;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.education-item {
    position: relative;
    padding: 2rem;
    background: rgba(45, 43, 85, 0.6);
    border-radius: 20px;
    border: 2px solid rgba(108, 99, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    width: 450px;
    min-height: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    isolation: isolate;
    will-change: transform;
    transform: translateZ(0);
}

.education-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(108, 99, 255, 0.4);
    border-color: var(--primary);
    border-width: 2px;
    background: rgba(45, 43, 85, 0.8);
}

.education-item::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -15px;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.6);
    z-index: 2;
}

.education-item::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
}

.education-item:last-child::after {
    display: none;
}

.education-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    color: var(--secondary);
    line-height: 1.3;
}

.education-content h4 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
    line-height: 1.3;
}

.education-content .date {
    display: inline-block;
    background: rgba(108, 99, 255, 0.2);
    padding: 0.25rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.education-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}

/* Projects Section */
#projects {
    background: rgba(45, 43, 85, 0.7);
    z-index: 1;
    isolation: isolate;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    align-items: stretch;
    justify-content: center;
    padding: 0 1rem;
}

.project-card {
    background: rgba(108, 99, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(108, 99, 255, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card:hover {
    transform: translateY(-20px) rotateY(5deg) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(108, 99, 255, 0.5),
        0 0 60px rgba(255, 101, 132, 0.3),
        inset 0 0 40px rgba(108, 99, 255, 0.1);
    border-color: var(--secondary);
    border-width: 2px;
}

.project-img {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.project-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.project-content p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-align: left;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tech {
    background: rgba(255, 101, 132, 0.2);
    color: var(--secondary);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

/* Certifications Section */
#certifications {
    background: rgba(108, 99, 255, 0.05);
}

.certs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 3rem;
    align-items: start;
}

.cert-card {
    background: rgba(45, 43, 85, 0.9);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    transition: all 0.4s ease;
    border: 2px solid rgba(108, 99, 255, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.cert-card:nth-child(odd) {
    align-self: stretch;
    margin-right: 0;
    margin-left: 0;
}

.cert-card:nth-child(even) {
    align-self: stretch;
    margin-left: 0;
    margin-right: 0;
}

.cert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.cert-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(108, 99, 255, 0.5),
        0 0 40px rgba(255, 101, 132, 0.3);
    border-color: var(--secondary);
}

.cert-card:hover::before {
    opacity: 0.1;
}

.cert-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.cert-card h3 i {
    color: var(--primary);
    flex-shrink: 0;
}

.cert-list {
    list-style: none;
    text-align: left;
}

.cert-list li {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.cert-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.cert-list a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    margin-bottom: 0.4rem;
}

.cert-list a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.cert-list a i {
    font-size: 0.8rem;
}

.cert-desc {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-left: 1.6rem;
    line-height: 1.4;
}

/* Featured Hackathon Highlight */
.hackathon-highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(108, 99, 255, 0.1));
    border: 2px solid rgba(255, 215, 0, 0.3) !important;
    border-radius: 10px;
    padding: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.featured-hackathon {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #ffd700 !important;
    position: relative;
}

.featured-hackathon i {
    color: #ffd700;
    font-size: 1rem !important;
    animation: starPulse 2s ease-in-out infinite;
}

@keyframes starPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.featured-hackathon:hover {
    color: #ffed4e !important;
    transform: translateX(10px) !important;
}

.hackathon-highlight .cert-desc {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Contact Section */
#contact {
    background: rgba(45, 43, 85, 0.7);
    z-index: 1;
    isolation: isolate;
}

.contact-container {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-card {
    background: rgba(108, 99, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(108, 99, 255, 0.3);
    backdrop-filter: blur(10px);
}

.contact-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(108, 99, 255, 0.3);
}

.contact-card h3 {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.contact-card i {
    color: var(--primary);
    font-size: 1.5rem;
}

.contact-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.social-link {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid rgba(108, 99, 255, 0.3);
}

.social-link:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 10px 25px rgba(108, 99, 255, 0.4);
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(108, 99, 255, 0.3);
    border-radius: 10px;
    color: var(--light);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(108, 99, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: rgba(45, 43, 85, 0.9);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(108, 99, 255, 0.2);
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

footer span {
    color: var(--secondary);
    font-weight: 600;
}

/* Responsive Styles */
@media (max-width: 992px) {

    /* Typography */
    .home-content h1 {
        font-size: 3rem;
    }

    .home-content h2 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 3rem;
    }

    /* Profile */
    .profile-img-container {
        margin: 0 auto;
    }

    .profile-img {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    /* Cards - Better borders */
    .skill-card,
    .project-card,
    .cert-card,
    .education-item,
    .timeline-content {
        border: 2px solid rgba(108, 99, 255, 0.3);
    }

    .skill-card:hover,
    .project-card:hover,
    .cert-card:hover,
    .education-item:hover {
        border-color: var(--primary);
    }

    /* Sections */
    section {
        padding: 4rem 2rem;
    }

    .section-container {
        padding: 0 2rem;
    }
}

@media (max-width: 992px) {

    /* Header and Navigation */
    header {
        padding: 1rem 5%;
    }

    nav ul {
        position: fixed;
        top: 70px;
        right: -100%;
        flex-direction: column;
        background: rgba(45, 43, 85, 0.98);
        width: 100%;
        text-align: center;
        padding: 2rem;
        transition: all 0.5s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        border-top: 2px solid rgba(108, 99, 255, 0.3);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    nav ul.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-link {
        padding: 1rem 0;
        font-size: 1.1rem;
    }

    /* Work Timeline */
    .work-timeline::before {
        left: 30px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
        padding-right: 1rem;
        margin-bottom: 2rem;
    }

    .timeline-item:nth-child(odd) .timeline-content::before,
    .timeline-item:nth-child(even) .timeline-content::before {
        left: -45px;
    }

    /* Content Padding */
    .home-content,
    .about-content,
    .contact-info,
    .contact-form {
        padding-right: 0;
    }

    /* Education Section - NO horizontal scroll, vertical stack */
    #education {
        overflow: visible;
        overflow-x: hidden;
        overflow-y: visible;
        padding: 4rem 1rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    #education::-webkit-scrollbar {
        display: none;
    }

    #education .section-title {
        margin-left: 0;
        text-align: center;
        font-size: 2.5rem;
    }

    .education-timeline {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 2rem;
        padding: 2rem 1rem;
        align-items: center;
    }

    .education-item {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 1.5rem;
        position: static;
    }

    .education-item::before {
        top: -15px;
        left: 50%;
        transform: translateX(-50%);
    }

    /* Home Section */
    .home-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    #home {
        flex-direction: column;
    }

    .home-content {
        max-width: 100%;
        text-align: center;
        order: 2;
        padding-right: 0;
    }

    .home-content h1,
    .home-content h2 {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .home-content p {
        text-align: justify;
        text-justify: inter-word;
        margin-left: auto;
        margin-right: auto;
    }

    .profile-img-container {
        order: 1;
        margin: 0 auto;
        min-width: auto;
    }

    .profile-img {
        margin: 0 auto;
    }

    .profile-img-inner img {
        object-fit: contain;
        object-position: center;
        width: 100%;
        height: 100%;
        background-color: var(--dark);
    }

    .btn-container {
        justify-content: center;
    }

    /* About Section */
    .about-container {
        flex-direction: column;
        gap: 2rem;
    }

    .about-img-slideshow {
        max-width: 100%;
        height: 400px;
    }

    /* Skills Section */
    .skills-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .skill-card {
        padding: 1.5rem;
    }

    /* Projects */
    .projects-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Contact Section */
    .contact-container {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-info,
    .contact-form {
        max-width: 100%;
    }

    /* Scroll Indicator - Hidden on mobile as requested */
    .scroll-indicator {
        display: none !important;
    }
}

@media (max-width: 576px) {

    /* Typography */
    body {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .home-content h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .home-content h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .home-content p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Buttons */
    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
    }

    .btn-container {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    /* Profile Image */
    .profile-img-container {
        margin: 0 auto 2rem;
    }

    .profile-img {
        width: 220px;
        height: 220px;
        margin: 0 auto;
    }

    .profile-img-inner img {
        object-fit: contain;
        object-position: center;
        width: 100%;
        height: 100%;
        background-color: var(--dark);
    }

    /* Cards */
    .projects-container,
    .certs-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
        gap: 1.5rem;
    }

    .project-card,
    .cert-card {
        width: 100%;
        margin: 0;
        padding: 1.5rem;
    }

    .skill-card {
        padding: 1.2rem;
    }

    /* Timeline */
    .timeline-item {
        padding-left: 60px;
        padding-right: 0.5rem;
    }

    .timeline-content h3 {
        font-size: 1.2rem;
        text-align: left;
    }

    .timeline-content h4 {
        font-size: 1rem;
        text-align: left;
    }

    /* Education */
    .education-item {
        padding: 1.2rem;
    }

    .education-item h3 {
        font-size: 1.3rem;
    }

    .education-item h4 {
        font-size: 1rem;
    }

    /* Forms */
    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.8rem;
    }

    /* Sections */
    section {
        padding: 3rem 1rem;
    }

    .section-container {
        padding: 0 1rem;
    }

    /* Scroll Indicator */
    .scroll-indicator {
        display: none !important;
    }

    /* About Section Image */
    .about-img-slideshow {
        height: 350px;
    }

    /* Header */
    header {
        padding: 0.8rem 1rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    /* Better Card Spacing */
    .skill-card,
    .project-card,
    .cert-card {
        border-radius: 15px;
    }

    /* Contact Form */
    .contact-form {
        padding: 2rem 1.5rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
        font-size: 0.9rem;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 1rem 0.5rem;
    background: rgba(45, 43, 85, 0.6);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(108, 99, 255, 0.3);
    isolation: isolate;
}

.scroll-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.scroll-dot.active {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary), 0 0 30px rgba(108, 99, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.scroll-dot:hover {
    transform: scale(1.4);
    background: rgba(108, 99, 255, 0.6);
    border-color: var(--primary);
}

.scroll-dot::after {
    content: attr(data-section);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(45, 43, 85, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.scroll-dot:hover::after {
    opacity: 1;
}

/* Floating elements for background */
.floating-element {
    position: absolute;
    border-radius: 50%;
    background: rgba(108, 99, 255, 0.1);
    z-index: -2;
    will-change: transform;
    /* Performance hint for animations */
    transform: translateZ(0);
    /* Force GPU acceleration */
}

/* Ultra-small screens (iPhone SE and below) */
@media (max-width: 375px) {

    /* Typography */
    .home-content h1 {
        font-size: 1.8rem;
    }

    .home-content h2 {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Profile */
    .profile-img-container {
        margin: 0 auto 1.5rem;
    }

    .profile-img {
        width: 200px;
        height: 200px;
        margin: 0 auto;
    }

    /* Buttons */
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Cards */
    .skill-card,
    .project-card,
    .cert-card,
    .education-item {
        padding: 1rem;
    }

    /* Sections */
    section {
        padding: 2.5rem 0.8rem;
    }

    /* Timeline */
    .timeline-item {
        padding-left: 50px;
    }

    .work-timeline::before {
        left: 20px;
    }

    /* Scroll Indicator */
    .scroll-indicator {
        padding: 0.5rem 0.8rem;
        bottom: 10px;
    }

    /* Header */
    .logo {
        font-size: 1.2rem;
    }
}

/* Landscape mode for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    section {
        padding: 2rem 1rem;
    }

    .home-content h1 {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .home-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .profile-img-container {
        margin: 0 auto 1rem;
    }

    .profile-img {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .scroll-indicator {
        display: none;
    }
}

/* --- Perfect Responsiveness Patches --- */
html,
body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}

img,
canvas,
video,
svg {
    max-width: 100%;
}

@media (max-width: 576px) {

    /* Maintain Left Alignment on Small Screens to prevent bad text grids */
    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    .about-content p,
    .about-content h3,
    .cert-card h3,
    .project-content p,
    .timeline-content p,
    .timeline-content li {
        text-align: left;
    }

    .home-content h1,
    .home-content h2,
    .section-title {
        text-align: center;
    }

    .home-content p {
        text-align: left;
    }

    .btn {
        width: 100%;
        max-width: 100%;
        display: block;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    /* Ensure containers don't break width constraint */
    .section-container {
        padding: 0 1rem;
        overflow-x: hidden;
    }

    /* Timeline spacing mobile fix */
    .work-timeline {
        padding: 0;
    }

    .timeline-item {
        padding-left: 50px;
    }
}