/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Navigation */
nav {
    position: absolute;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

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

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    transition: width 0.3s ease;
}

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

.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f6f8ff 0%, #a0a9dc81 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;

}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 150%;
    background: linear-gradient(45deg, rgba(37, 99, 235, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    animation: rotate 20s linear infinite;
    border: 1px solid #a0a9dc81;
}

.hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 150%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
    z-index: -1;
    opacity: 0.9;
    animation: revrotate 20s linear infinite;
    border: 1px solid #a0a9dc81;
}

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

    to {
        transform: rotate(360deg);
    }
}

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

    to {
        transform: rotate(-360deg);
    }
}

.hero-content {
    text-align: center;
    max-width: 800px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #1a365d;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.typed-text {
    font-size: 1.8rem;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.3s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.hero-text {
    flex: 1;
    text-align: left;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;

    transition: transform 0.3s ease;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        margin-bottom: 2rem;
        text-align: center;
        /* Center the text */
    }

    .hero-image {
        display: none;
        /* Hide the image on small screens */
    }

    .hero h1 {
        font-size: 2.5rem;
        /* Adjust font size for smaller screens */
    }

    .typed-text {
        font-size: 1.4rem;
        /* Adjust font size for smaller screens */
    }
}

.social-links {
    display: flex;
    
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 0.6s forwards;
}

.social-links a {
    color: #2563eb;
    font-size: 1.8rem;
    transition: all 0.3s;
}

.social-links a:hover {
    transform: translateY(-5px) scale(1.1);
    color: #4f46e5;
}

.resume-btn{
    margin-top: 2rem;
}
.resume-btn a {
    text-decoration: none;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s;
}
/* About Section */
.about {
    padding: 5em 2rem;
    background-color: #fff;
    position: relative;
    overflow: hidden; /* Ensure background images stay within the section */
}

 .bg-image {
    position: absolute;
    /* width: 100px; */
     /* Adjust size as needed */
    height: 200px; 
    /* Adjust size as needed */
    opacity: 1; /* Make the images subtle */
    z-index: -1; /* Ensure images are behind the text */
    pointer-events: none; /* Prevent interaction with the images */
}

.bg-image:nth-child(1) {
    top: 10%;
    left: 15%;
    /* transform: rotate(15deg); */
}

 .bg-image:nth-child(2) {
    bottom: 0%;
    right: 0%;
    transform: rotate(-3deg);
    /* opacity: 0.3; */
}

.skills .bg-image:nth-child(1){
    opacity: 1;
    top: 5%;
    left: 10%;
    z-index: 0;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about.show .about-content {
    opacity: 1;
    transform: translateY(0);
}

.about-text {
    text-align: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: #4a5568;
    line-height: 1.8;
}

/* Skills Section */
.skills {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e5e9ff 100%);
    position: relative;
   
}


.skills::after{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.8) 100%);
    z-index: -1;
    opacity: 0.9;
}

.skills-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.skill-card {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.skills.show .skill-card {
    opacity: 1;
    transform: translateY(0);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.1);
}

.skill-card h3 {
    color: #1a365d;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.skill-card h3 i {
    font-size: 2rem;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    color: #4a5568;
    font-weight: 500;
}

.skill-percentage {
    color: #2563eb;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.skills.show .progress {
    transform: scaleX(1);
}

/* Projects Section */
.projects {
    padding: 3rem 2rem;
    background-color: #fff;
    position: relative;
}

.projects-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 2rem 0;
}

.project-card {
    background-color: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Subtle shadow for normal state */
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.projects.show .project-card {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-10px) scale(1.02);
    /* Slight lift and scale effect */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2),
        /* Stronger shadow on hover */
        0 6px 6px rgba(0, 0, 0, 0.15);
    /* Secondary shadow for depth */
}

.project-image {
    height: 220px;
    background-color: #e2e8f0;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.project-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: #1a365d;
    font-size: 1.4rem;
}

.project-card p {
    padding: 0 1.5rem 1.5rem;
    color: #4a5568;
    font-size: 1.1rem;
}

.project-links {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.project-links a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    transition: all 0.3s;
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.project-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-close:hover {
    color: #2563eb;
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 2rem;
    color: #1a365d;
    margin-bottom: 1rem;
}

.project-details {
    display: grid;
    gap: 2rem;
}

.detail-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h4 {
    color: #2563eb;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tool-tag {
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.project-timeline {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #4a5568;
}

.project-timeline i {
    color: #2563eb;
}

/* Contact Section */
.contact {
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e5e9ff 100%);
    position: relative;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.contact.show .contact-content {
    opacity: 1;
    transform: translateY(0);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#contact-form input,
#contact-form textarea {
    padding: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.9);
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

#contact-form textarea {
    height: 180px;
    resize: vertical;
}

#contact-form button {
    padding: 1.2rem;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(45deg, #1a365d, #1e40af);
    color: #fff;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
}

/* Common Section Styles */
section {
    padding: 8rem 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: #1a365d;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    border-radius: 2px;
}

/* Progress Line */
.progress-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    z-index: 1001;
    width: 0;
    transition: width 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .resume-btn a {
        padding: 1rem 1rem;
        font-size: 1rem;
        margin-top: 3rem;
    }
    .social-links{
        justify-content: center;
    }
    .about .bg-image:nth-child(1) {
        top: -5%;
        left: -5%;
        /* transform: rotate(15deg); */
    }
    .about .bg-image:nth-child(2) {
        bottom: -1%;
        right: -20%;
        transform: rotate(-3deg);
        opacity: 0.3;
        display: none;
    }
    .skills .bg-image:nth-child(1){
        opacity: 1;
        top: -1%;
        left: 1%;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 1rem;
        flex-direction: column;
        align-items: center;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .typed-text {
        font-size: 1.4rem;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 2.2rem;
    }

    .about-text p {
        font-size: 1.1rem;
    }
}


.experience-content {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.experience-card {
    max-width: 400px;
    /* padding: 2.5rem; */
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    text-align: left;
    transition: all 0.4s ease;
    /* transform: translateY(30px); */
    display: flex;
    flex-direction: column;
    /* overflow: hidden; */
}

.experience-card .top-section {
    background: linear-gradient(45deg, rgb(37, 99, 235), rgb(79, 70, 229));
    color: #fff;
    padding: 1rem;
    text-align: center;
    font-weight: bold;
    border-radius: 15px 15px 0px 0px;
}

.experience-card .middle-section {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(45deg, rgb(37, 99, 235), rgb(79, 70, 229));
}

.experience-card .middle-section img {
    max-width: 80px;
    height: auto;
    border-radius: 50%;
}

.experience-card .bottom-section {
    background-color: #fff;
    padding: 1.5rem;
    text-align: center;
    color: #333;
    border-radius: 0px 0px 15px 15px;
}


/* Education Section */
.education-section {
    padding: 8rem 2rem;
    background-color: #f8f9fa;
    position: relative;
}

.education-section h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: #1a365d;
    position: relative;
    padding-bottom: 1rem;
}

.education-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    border-radius: 2px;
}


/* Education Section */
.education-section {
    padding: 8rem 2rem;
    background-color: #f8f9fa;
    position: relative;
}

.education-section h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: #1a365d;
    position: relative;
    padding-bottom: 1rem;
}

.education-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    border-radius: 2px;
}

/* Timeline Styles */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    margin: 0 auto;
    max-width: 80%;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 4px;
    height: 100%;
    background: linear-gradient(45deg, #2563eb, #4f46e5);
    z-index: -1;
}

.timeline-item {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -22px;
    width: 20px;
    height: 20px;
    background: #2563eb;
    border: 4px solid #fff;
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2563eb;
}

.timeline-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    min-width:280px;
    height: min-content;
    min-height: 200px;
    
}

/* Horizontal Timeline for Large Screens */
@media (min-width: 768px) {
    .timeline {
        flex-direction: row;
        gap: 5rem;
        overflow-x: auto;
        padding: 2rem 0;
    }

    .timeline::before {
        top: 50%;
        left: 0;
        width: 100%;
        height: 4px;
        transform: translateY(-50%);
    }

    .timeline-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-left: 0;
    }

    .timeline-item::before {
        top: 50%;
        left: 0;
        transform: translateY(-50%);
    }

    .timeline-content {
        max-width: 300px;
    }
}

.timeline-content p{
    /* font-size:0.9rem; */
    overflow-wrap:break-word;
    line-height: 2rem;
}

#experience{
    box-sizing: border-box;
    max-width: 100%;
    overflow: hidden;
}

.symbol {
    position: absolute;
    color: #2563eb;
    font-size: 24px;
    opacity: 0.3;
    user-select: none;
    pointer-events: none;
    animation: move 10s linear infinite;
    z-index: -1; /* Ensure symbols are behind the content */
}
@keyframes move {
    0% { transform:translate(0, 0) rotate(var(--angle));
    opacity: 0.3; }
    100% {transform: translate(var(--dx), var(--dy)) rotate(var(--angle));
        opacity: 0.5; }
}



/* CSS for Coding Platforms Section */
.coding-platforms {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
    text-align: center;
}

.coding-platforms h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #1a365d;
}

.platforms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.platform-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    max-width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.platform-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.platform-card img {
    max-width: 80px; /* Adjust logo size */
    height: auto;
    margin-bottom: 1rem;
}

.platform-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #2563eb;
}

.platform-card p {
    font-size: 1rem;
    color: #333;
}

.platform-card a {
    color: #2563eb;
    text-decoration: none;
    font-weight: bold;
}

.platform-card a:hover {
    text-decoration: underline;
}