*{
    padding: 0;
    margin: 0;
    box-sizing:border-box  ;
}
html {
    scroll-behavior: smooth;
}
body{
    background-color: #1e1e1e;
    font-family: sans-serif;
    color: #a0a0a0;
    line-height: 1.6;
}

/* Global link reset */
a {
    text-decoration: none;
    color: inherit;
}
.main-container{
    display: grid;
    max-width: 1200px;
    grid-template-columns: 350px 1fr;
    grid-template-areas: "sidebar main";
    gap: 50px;
    padding-top: 40px;
    margin: auto;
}
.side-bar{
     grid-area: sidebar;
     height: 90vh;
     background-color: #2a2a2a;
     border: 1px solid #3a3a3a;
     border-radius: 16px;
     padding: 40px;
     position: sticky;
     top:40px
}
.main-content{
    grid-area: main;
    /* height: 90vh; */
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 16px;
    padding: 40px;
}

/* profile section css */
.profile{
    text-align: center;
}

.profile img{
    height: 120px;
    width: 120px;
    border-radius: 50%;
    border: 1px solid #3a3a3a;
}
.profile h2{
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 20px;
    color: #e0e0e0 ;
}
.profile p{
    background-color: #1e1e1e;
    padding: 5px 15px;
    color: #FFBF00;
    border: 1px solid #3a3a3a;
    font-size: 0.8rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: 10px;
}

/* contact-info css */
.contact{
    margin-top: 30px;
    border-top: 2px solid #3a3a3a;
    padding-top: 20px;
}
.label{
    font-weight: 500;
    font-size: 0.8rem;
    color: #a0a0a0;
}
.value{
    color: #e0e0e0;
    text-decoration: none;
}
.email, .phone{ /* here we used many class in one line*/
    margin-bottom: 15px;
}
/* social css*/
.social{
    margin-top: 30px;
    border-top: 2px solid #3a3a3a;
    padding-top: 20px;
    text-align: center;
}
.social img{
    /* height: 30px;
    width: 30px;  */
    margin-left:5px ;
    filter: grayscale(1) invert(0.7);
    transition: filter 0.3s ease;
   
}
.social img:hover{
    filter: grayscale(0) invert(0);
}
.github-icon{
    height: 30px;
    width:25px
}
.linkedin-icon{
    height: 27px;
    width:30px
}
.leetcode-icon{
    height: 25px;
    width:25px;
    margin-bottom: 2px;
    
}



/* main-content css */

/* navigation css */
#navigation{
   
    border-bottom: 2px solid #3a3a3a;
    margin-bottom: 20px;
    padding-bottom: 20px;
}
nav{
    display:flex;
    justify-content: flex-end;
    gap:30px;
}  
nav a{
    text-decoration: none;
    color: #a0a0a0;
    font-weight: 500;
    transition: color 0.3s ease;
   
}
.active,nav a:hover{
    color: #FFBF00 ;
}

/* about me css */
#about{
    margin-bottom: 40px;
}
.heading{
    color: #e0e0e0;
    font-size: 2rem;
    margin-bottom: 15px;
}
.line{
    width: 60px;
    height: 5px;
    background-color: #FFBF00;
    margin-bottom: 15px;
}
.content{
    text-align: justify;
}

/* skills section ki css*/
#skills{

}
.grid-container{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px,1fr));
    gap: 30px;

}
.item{
    padding: 20px;
    /* height: 100%;
    width: 100%; */
    border-radius: 10px;
    border: 2px solid #3a3a3a;
    background-color:#1e1e1e;
    text-align: center;
    margin-top: 20px;
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.item img{
    height: 28px;
    width: 28px;
    filter: invert(75%) sepia(50%) saturate(1000%) hue-rotate(350deg) brightness(110%) contrast(101%);
    margin-bottom: 15px;
}
.item h3{
    font-size: 1rem;
    font-weight: 500;

}
.item:hover{
    transform: scale(1.1);
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.3);
}

/* Education */
#education{
    margin-top: 30px;
}
.edtech{
    position: relative;
    margin-top: 20px;
}
.year{
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 1px;

}
.degree{
    color: #e0e0e0;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 5px;
}
.college{
    color: #a0a0a0;
    font-style: italic;
    margin-bottom: 5px;

}
.edtech p{
    text-align: justify;
}
.work{
    color: #a0a0a0;
}
.ed1,.ed2{
    margin-bottom: 30px;
    position: relative;
    padding-left: 20px;
}
.goal{
    height: 15px;
    width: 15px;
    border-radius: 50%;
    border:3px solid #FFBF00 ;
    position: absolute ;
    top: 5px;
    left:0px;
    z-index: 5;

}
.ed-liner{
    position: absolute;
    width: 1px;
    top: 21px;
    bottom: 7px; 
    left:5.5px;
    border: 2px solid  #3a3a3a;

}

/* portflio css */
.project-container{
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr  ;
    gap: 25px;
    
}
.project{
    background-color: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.project:hover{
    transform: translateY(-10px);
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.3);
}
.project img{
    height: 180px;
    width: 100%;  
    object-fit: cover;
}
/* Project/certificate image system (single source of truth) */
.img-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

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

.project:hover .overlay {
    opacity: 1;
}

.img-container .overlay {
    position: absolute;
    /* Fill the container regardless of its computed height */
    inset: 0;
    background: rgba(30, 30, 30, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}
.img-container .overlay .btn {
    pointer-events: auto;
}


.img-container .overlay .btn {
    background-color: #FFBF00;
    color: #1e1e1e;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.25s ease, color 0.25s ease;
}
/* Force certificate overlay button text like projects */
.img-container .overlay .btn,
.img-container .overlay .btn span {
    color: #1e1e1e;
}
.btn {
    background-color: #FFBF00;
    color: #1e1e1e;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.25s ease, color 0.25s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}
.btn:hover {
    background-color: #2a2929;
    color: #FFBF00;
}


.img-container .overlay .btn:hover {
    background-color: #2a2929;
    color: #FFBF00;
}

/* Certificates behave like projects on hover */
/* Certificate overlay trigger (scoped, safe) */
.achievement-card:hover .achievement-preview .overlay {
    opacity: 1;
}
/* Badges standalone, no card look */
#achievements .badges-list {
    background: transparent;
    border: none;
    padding: 0;
    margin-top: 10px;
}

#achievements .achievement-title + .badges-list {
    padding: 0;
    border: none;
    background: transparent;
}


.card{
    padding: 20px;
}
.card h3{
    color: #e0e0e0;
    margin-bottom: 10px;
}
.card p{
    color: #a0a0a0;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 15px;

}
.card span{
    background-color: rgba(255, 191, 0, 0.1);
    color: #FFBF00;
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 0.75rem;
    margin-right: 5px;
}

#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: #FFBF00;
    background-color: #2a2929;
    border: none;
    cursor: pointer;
    font-size: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}
#scrollTopBtn:hover {
    transform: scale(1.1);

    background-color: #343232;
    color: #FFBF00;
}

@media screen and (max-width: 750px) {
    #scrollTopBtn {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
        font-size: 1.5rem;
    }
}

/* Additional mobile responsiveness for smaller screens */
@media screen and (max-width: 480px) {
    #scrollTopBtn {
        width: 35px;
        height: 35px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 320px) {
    #scrollTopBtn {
        width: 30px;
        height: 30px;
        bottom: 10px;
        right: 10px;
        font-size: 1rem;
    }
}

/* mobile responsiveness ka code */
@media screen and (max-width:1200px) {
    .main-container{
        grid-template-columns: 1fr;
        grid-template-areas: 
            "sidebar"
            "main";
        padding: 20px;
        gap: 30px;
        max-width: 100%;
    }
    .side-bar{
        position: static;
        height: auto;
        padding: 30px;
    }
    .contact{
        display: flex;
        justify-content: center;
        gap: 30px;
        text-align: center;
        flex-wrap: wrap;
    }
    .contact > div {
        flex: 1;
        min-width: 120px;
    }
    .main-content {
        padding: 30px;
    }
    .heading {
        font-size: 1.8rem;
    }
}
@media screen and (max-width:750px) {
    .project-container{
        grid-template-columns: 1fr;
        gap: 20px;
    }
    #navigation nav{
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    .side-bar{
        display: block;
        text-align: center;
        padding: 25px 20px;
    }
    .contact {
        flex-direction: column;
        gap: 15px;
        margin-top: 25px;
    }
    .social {
        margin-top: 20px;
        padding-top: 15px;
    }
    .heading {
        font-size: 1.6rem;
    }
    .content {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 15px;
    }
    .item {
        padding: 15px 10px;
    }
    .ed1, .ed2 {
        padding-left: 15px;
        margin-bottom: 25px;
    }
    .main-container {
        padding: 15px;
    }
}

@media screen and (max-width: 600px) {
    .main-container {
        padding: 15px 10px;
        gap: 20px;
    }
    .side-bar, .main-content {
        padding: 20px 15px;
        border-radius: 12px;
    }
    .profile img {
        height: 100px;
        width: 100px;
    }
    .profile h2 {
        font-size: 1.3rem;
    }
    .profile p {
        font-size: 0.75rem;
        padding: 4px 12px;
    }
    .heading {
        font-size: 1.5rem;
    }
    .line {
        width: 50px;
        height: 4px;
    }
    .content {
        font-size: 0.9rem;
    }
    .grid-container {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 15px;
    }
    .item {
        padding: 12px 8px;
    }
    .item img {
        height: 24px;
        width: 24px;
    }
    .item h3 {
        font-size: 0.85rem;
    }
    .project-container {
        gap: 15px;
    }
    .img-container {
        height: 150px;
    }
    .card {
        padding: 15px;
    }
    .card h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    .card p {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }
    .card span {
        font-size: 0.7rem;
        padding: 3px 6px;
        margin-right: 4px;
        margin-bottom: 4px;
        display: inline-block;
    }
    .degree {
        font-size: 1.1rem;
    }
    .year {
        font-size: 0.8rem;
    }
    .college {
        font-size: 0.85rem;
    }
    .work {
        font-size: 0.85rem;
    }
    #navigation nav {
        gap: 15px;
    }
    nav a {
        font-size: 0.9rem;
    }
    .social img {
        margin-left: 3px;
    }
    .github-icon {
        height: 25px;
        width: 22px;
    }
    .linkedin-icon {
        height: 23px;
        width: 25px;
    }
    .leetcode-icon {
        height: 22px;
        width: 22px;
    }
}


@media screen and (max-width: 480px) {
    nav {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .contact {
        gap: 10px;
    }

    .project-container {
        grid-template-columns: 1fr;
    }

    .card p {
        text-align: left;
    }

    .edtech p {
        text-align: left;
    }
}
/* Achievements - Badges */
#achievements {
    margin-top: 40px;
}

/* Justified text support for certificates */
.justify-text {
    text-align: justify;
}

/* Fixed badges CSS */
.badges-list {
    /* Controls how many badges per row and spacing */
    --badge-min: 140px;
    --badge-gap: 12px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--badge-min), 1fr));
    gap: var(--badge-gap);
    margin: 16px 0 24px;
    justify-items: stretch; /* stretch cells so no unused space */
    align-items: stretch;
}

.badges-list a {
    display: block;
    width: 100%;
}

.badges-list img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    background-color: #1e1e1e;
    border: 1px solid #3a3a3a;
    padding: 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.badges-list a:hover img {
    transform: scale(1.04);
    box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.35);
}

@media screen and (max-width: 600px) {
    .badges-list { --badge-min: 120px; --badge-gap: 10px; }
    .badges-list img { padding: 8px; }
}

/* Achievements - Certificates */

.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
    align-items: stretch;
    justify-items: stretch;
}

.achievement-card {
    background-color: #1e1e1e;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0;
}
.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.3);
}

.achievement-preview {
    width: 100%;
    height: 180px;
    overflow: hidden;
    position: relative;
    background: #1e1e1e;
}

.achievement-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.achievement-preview .overlay .btn {
    pointer-events: auto;
}

.achievement-card:hover .achievement-preview .overlay {
    opacity: 1;
}

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

.achievement-info {
    text-align: left;
    flex-grow: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Certificate titles color */
.achievement-info h3 {
    color: #e0e0e0;
}

.achievement-title {
    margin-bottom: 10px;
    line-height: 1.3;
    margin-top: 20px;
}

.achievement-desc {
    margin-bottom: 14px;
    line-height: 1.65;
}


@media screen and (max-width: 600px) {
    .achievements-container { grid-template-columns: 1fr; }
    /* Let certificate images scale naturally on phones */
    .achievement-preview { height: auto; }
    .achievement-preview img {
        width: 100%;
        height: auto;
        object-fit: contain;
        padding: 8px;
    }
}
.achievement-card {
    display: flex;
    flex-direction: column;
}

.achievement-link,
.achievement-link:visited {
    color: inherit;
}


/* Achievement text links only, not buttons */
#achievements a:not(.btn) {
    color: #FFBF00;
}

/* Prevent achievements link color from leaking into overlay buttons */

/* Default state only, allow hover to control color */
.img-container .overlay a.btn:not(:hover),
.img-container .overlay a.btn:visited:not(:hover) {
    color: #1e1e1e;
}

/* Final overrides to ensure badges fit on all screens */
.badges-list { margin: 16px 0 24px 0; }
.badges-list img { margin-bottom: 6px; height: auto; width: 100%; }

/* Ensure the certificate action is reachable on touch devices */
@media (hover: none) {
    .achievement-card .achievement-preview .overlay { opacity: 1; }
}

