/* ----- POPPINS FONT Link ----- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* ----- VARIABLES ----- */
:root{
    --body-color: #fafafa;
    --color-white: rgb(255, 255, 255);

    --text-color-second: rgb(68, 68, 68);
    --text-color-third: #1e9fab;

    --first-color: #6e57e0;
    --first-color-hover: rgb(40, 91, 212);

    --second-color: #00c9ff; 
    --third-color: rgb(192, 166, 49);
    --first-shadow-color: rgba(0, 0, 0, 0.1);

}

/* ----- BASE ----- */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* ----- SMOOTH SCROLL ----- */
html{
    scroll-behavior: smooth;
}

/* ----- CHANGE THE SCROLL BAR DESIGN ----- */
::-webkit-scrollbar{
    width: 10px;
    border-radius: 25px;
}
::-webkit-scrollbar-track{
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb{
    background: #ccc;
    border-radius: 30px;
}
::-webkit-scrollbar-thumb:hover{
    background: #bbb;
}


/* ---##-- REUSABLE CSS --##--- */

/* ----- GLOBAL BUTTON DESIGN ----- */
.btn{
    font-weight: 500;
    padding: 12px 20px;
    background: #efefef;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: .4s;
    color: inherit;
    text-decoration: none;
}
.btn>i{
    margin-left: 10px;
}
.btn:hover{
    background: var(--second-color);
    color: var(--color-white);
}

/* ----- GLOBAL ICONS DESIGN ----- */
i{
    font-size: 16px;
}

/* ------- BASE -------- */
body{
    background: var(--body-color);
}
.container{
    width: 100%;
    position: relative;
}

/* ----- NAVIGATION BAR ----- */
nav {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 90px;
    line-height: 90px;
    background: var(--body-color);
    padding: 0 8%; /* Reduced padding for better fit on smaller screens */
    transition: 0.3s;
    z-index: 100;
}
.nav-logo{
   position: relative;
}
.nav-name{
    font-size: 30px;
    font-weight: 600;
    color: var(--text-color-third);
}
.nav-logo span{
    position: absolute;
    top: -15px;
    right: -20px;
    font-size: 5em;
    color: var(--text-color-second);
}
.nav-menu, .nav_menu_list{
    display: flex;
}
.nav-menu .nav_list{
    list-style: none;
    position: relative;
}
.nav-link{
    text-decoration: none;
    color: var(--text-color-second);
    font-weight: 500;
    padding-inline: 15px;
    margin-inline: 20px;
}
.nav-menu-btn {
    display: none;
}
.nav-menu-btn i{
    font-size: 28px;
    cursor: pointer;
}
.active-link{
    position: relative;
    color: var(--first-color);
    transition: .3;
}
.active-link::after{
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translate(-50%, -50%);
    width: 5px;
    height: 5px;
    background: var(--first-color);
    border-radius: 50%;
}

/* ----- WRAPPER DESIGN ----- */
.wrapper{
    padding-inline: 10vw;
}

/* ----- FEATURED BOX ----- */
.featured-box{
    position: relative;
    display: flex;
    height: 100vh;
    min-height: 700px;
}

/* ----- FEATURED TEXT BOX ----- */
.featured-text{
    position: relative;
    display: flex;
    justify-content: center;
    align-content: center;
    min-height: 80vh;
    flex-direction: column;
    width: 50%;
    padding-left: 20px;
}
.featured-text-card span{
    background: var(--third-color);
    color: var(--color-white);
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 5px;
}
.featured-name{
    font-size: 50px;
    font-weight: 600;
    color: var(--text-color-second);
    margin-block: 20px;
}
/* Ensure proper spacing between elements */
.featured-name p span {
    display: inline-block;
    margin-right: 8px;
}
.typedText{
    text-transform: capitalize;
    color: var(--text-color-third);
}
.featured-text-info{
    font-size: 15px;
    margin-bottom: 30px;
    color: var(--text-color-second);
}
.featured-text-btn{
    display: flex;
    gap: 20px;
}
.featured-text-btn>.blue-btn{
    background: var(--first-color);
    color: var(--color-white);
}
.featured-text-btn>.blue-btn:hover{
    background: var(--first-color-hover);
}
.social_icons {
    display: flex;
    margin-top: 5em;
    gap: 30px;
}
.social_icons a {
    color: inherit; /* This will inherit the color from the parent element */
    text-decoration: none; /* This removes the underline from the links */
}
.icon{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0px 2px 5px 0px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}
.icon:hover{
    color: var(--first-color);
}

/* ----- FEATURED IMAGE BOX ----- */
.featured-image{
    display: flex;
    justify-content: right;
    align-content: center;
    min-height: 80vh;
    width: 50%;
}
.image{
    margin: auto 0;
    width: 380px;
    height: 380px;
    border-radius: 55% 45% 55% 45%;
    overflow: hidden;
    animation: imgFloat 7s ease-in-out infinite;
}
.image img{
    width: 380px;
    height: 380px;
    object-fit: cover;
}
@keyframes imgFloat {
    50%{
        transform: translateY(10px);
        border-radius: 45% 55% 45% 55%;
    }
}
.scroll-btn{
   position: absolute;
   bottom: 0;
   left: 50%;
   translate: -50%;
   display: flex;
   justify-content: center;
   align-items: center;
   width: 150px;
   height: 50px;
   gap: 5px;
   text-decoration: none;
   color: var(--text-color-second);
   background: var(--color-white);
   border-radius: 30px;
   box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.25);
}
.scroll-btn i{
    font-size: 20px;
}

/* ----- MAIN BOX ----- */
.section{
    padding-block: 5em;
}
.row{
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 50px;
}
.col{
    display: flex;
    width: 50%;
}

/* -- ## --- RESUABLE CSS -- ## -- */
.top-header{
    text-align: center;
    margin-bottom: 5em;
}
.top-header h1{
    font-weight: 600;
    color: var(--text-color-second);
    margin-bottom: 10px;
}
.top-header span{
    color: #999;
}
h3{
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color-second);
    margin-bottom: 15px;
}

/* ----- ABOUT INFO ----- */
.about-info{
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    padding-block: 30px 70px;
    padding-inline: 20px;
    width: 100%;
    background: var(--color-white);
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    border-radius: 20px;
}
.about-info p{
    text-align: center;
    font-size: 15px;
    color: #777;
}
.about-btn button{
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: var(--first-color);
    color: var(--color-white);
    border-radius: 30px;
}
.about-btn button:hover{
    background: var(--first-color-hover);
}

/* ----- ABOUT / SKILLS BOX ----- */
/* Skills Container */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

/* Skill Card */
.skills-card {
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    transition: transform 0.2s, box-shadow 0.2s;
    background: var(--color-white);
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    border-radius: 20px;
}

.skills-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
}

/* Skills Header */
.skills-header {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--first-color, #333);
    text-transform: uppercase;
}

/* Skills List */
.skills-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-list li {
    font-size: 14px;
    background: var(--first-color, #007bff);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px 0;
    display: inline-block;
    word-wrap: break-word;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .skills-header {
        font-size: 16px;
    }

    .skills-card {
        padding: 10px;
    }

    .skills-list li {
        font-size: 13px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .skills-container {
        grid-template-columns: 1fr;
    }

    .skills-header {
        font-size: 14px;
    }

    .skills-list li {
        font-size: 12px;
        padding: 3px 6px;
    }
}

/* ----- ACHIEVEMENTS BOX ----- */
.project-container{
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.project-box{
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 30%;
    height: 250px;
    background: var(--color-white);
    border-radius: 20px;
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    overflow: hidden;
}
.project-box>i{
    font-size: 50px;
    color: #00B5E7;
    margin-bottom: 25px;
}
.project-box label{
    font-size: 15px;
    color: #777;
}
.project-box::after, .contact-info::after{
    content: "";
    position: absolute;
    bottom: -100%;
    background: var(--second-color);
    width: 100%;
    height: 100%;
    transition: .4s;
    z-index: 1;
}
.project-box:hover.project-box::after,
.contact-info:hover.contact-info::after{
    bottom: 0;
}
.project-box:hover.project-box i,
.project-box:hover.project-box>h3,
.project-box:hover.project-box>label{
    color: var(--color-white);
    z-index: 2;
}

/* ----- TOP 3 PROJECT CONTAINER ----- */
.top-project-container {
    display: flex;
    justify-content: center;
    align-items: stretch; /* Makes all boxes equal height */
    gap: 20px; /* Adds spacing between project boxes */
    flex-wrap: wrap; /* Allows boxes to wrap on smaller screens */
    margin-top: 20px;
}

/* ----- TOP 3 PROJECT BOX ----- */
.top-project-box {
    position: relative;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    justify-content: flex-start;
    align-items: center;
    width: 30%; /* Default width of each project box */
    background: var(--color-white);
    border-radius: 15px;
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
}

/* Add responsive behavior for narrower screens */
@media (max-width: 1200px) {
    .top-project-box {
        width: 45%; /* Two boxes per row on medium screens */
    }
}

@media (max-width: 800px) {
    .top-project-box {
        width: 100%; /* Stack boxes vertically on small screens or split screen */
    }
}

/* ----- TOP PROJECT HOVER EFFECTS ----- */
.top-project-box:hover {
    transform: scale(1.05); /* Adds hover scaling effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.top-project-thumbnail {
    width: 70px; /* Larger size for Top 3 images */
    height: 70px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.3s ease-in-out;
}

.top-project-box:hover .top-project-thumbnail {
    transform: rotate(10deg); /* Fun rotation effect on hover */
}

.top-project-box h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.top-project-box p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin: 0 10px;
}

/* ------ CERTIFICATES BOX ----- */
/* Certificate Container */
.certificate-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.certificate-box {
    position: relative;
    width: calc(33.333% - 20px); /* 3 boxes per row on large screens */
    background: var(--color-white);
    border-radius: 15px;
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.certificate-box img {
    width: 100%;
    display: block;
}

.certificate-box h3 {
    margin: 10px 0;
    font-size: 1.2em;
}

.certificate-box:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.03);
}

/* Responsive Certificate Box */
@media (max-width: 1200px) {
    .certificate-box {
        width: calc(50% - 20px); /* 2 boxes per row on medium screens */
    }
}

@media (max-width: 800px) {
    .certificate-box {
        width: calc(100% - 20px); /* 1 box per row on small screens */
    }
}

/* Full-Screen Overlay */
.certificate-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: hidden;
}

/* Container for image and button */
.certificate-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
    max-height: 90vh;
    background: transparent;
}

.certificate-overlay img {
    display: block;
    max-width: 90vw;
    max-height: 75vh;
    width: auto;
    height: auto;
    border: 5px solid #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.certificate-overlay .close-btn {
    position: relative;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.certificate-overlay .close-btn:hover {
    background: rgba(255, 0, 0, 1);
    transform: rotate(180deg);
}

/* Add this to prevent body scrolling when overlay is open */
body.overlay-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Media queries for better responsiveness */
@media screen and (max-width: 768px) {
    .certificate-content {
        padding: 10px;
    }

    .certificate-overlay img {
        max-width: 95vw;
        max-height: 70vh;
        border-width: 4px;
    }

    .certificate-overlay .close-btn {
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
}

/* For very small screens */
@media screen and (max-width: 480px) {
    .certificate-content {
        padding: 5px;
    }

    .certificate-overlay img {
        max-width: 98vw;
        max-height: 65vh;
        border-width: 3px;
    }

    .certificate-overlay .close-btn {
        width: 32px;
        height: 32px;
        font-size: 1.3rem;
    }
}

/* ----- CONTACT BOX ----- */
.contact-info{
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 30px;
    width: 100%;
    height: 315px;
    background: var(--second-color);
    border-radius: 10px;
    box-shadow: 1px 8px 10px 2px var(--first-shadow-color);
    overflow: hidden;
}
.contact-info>h2{
    color: var(--color-white);
    margin-bottom: 20px;
}
.contact-info>p{
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    margin-block: 5px;
}
.contact-info p>i{
    font-size: 18px;
}
.contact-info::after{
    background: var(--color-white);
}
.contact-info:hover.contact-info h2,
.contact-info:hover.contact-info p,
.contact-info:hover.contact-info i{
    color: #777;
    z-index: 2;
}

/* ----- CONTACT FORM ----- */
.form-control{
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.form-inputs{
    display: flex;
    gap: 10px;
    width: 100%;
}
.input-field{
    width: 50%;
    height: 55px;
    background: transparent;
    border: 2px solid #AAA;
    border-radius: 10px;
    padding-inline: 20px;
    outline: none;
}
textarea{
    width: 100%;
    height: 250px;
    background: transparent;
    border: 2px solid #AAA;
    border-radius: 10px;
    padding: 15px 20px;
    outline: none;
    resize: none;
}
.form-button>.btn{
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--second-color);
    color: var(--color-white);
}
.form-button>.btn:hover{
    background: #00B5E7;
}
.form-button i{
    font-size: 18px;
    rotate: -45deg;
}

/* ----- FOOTER BOX ----- */
footer{
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    row-gap: 30px;
    background: #F8F8F8;
    padding-block: 40px 60px;
}
.top-footer p{
    font-size: 25px;
    font-weight: 600;
}
.middle-footer .footer-menu{
    display: table-cell;
}
.footer_menu_list{
    list-style: none;
}
.footer_menu_list a{
    text-decoration: none;
    color: var(--text-color-second);
    font-weight: 500;
    margin-inline: 20px;
}
.footer-social-icons{
    display: flex;
    gap: 30px;   
}
.footer-social-icons a{
    color: inherit;
    text-decoration: none;
}
.bottom-footer{
    font-size: 14px;
    margin-top: 10px;
}


/* ----- MEDIA QUERY == 1024px / RESPONSIVE ----- */
@media only screen and (max-width: 1024px){
    .featured-text{
        padding: 0;
    }
    .image, .image img{
        width: 320px;
        height: 320px;
    }
}

/* ----- MEDIA QUERY == 900px / RESPONSIVE ----- */
@media only screen and (max-width: 900px) {
    .nav-button{
        display: none;
    }
    .nav-menu.responsive{
        left: 0;
    }
    .nav-menu{
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: rgba(255, 255, 255, 0.7);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        width: 100%;
        min-height: 450px;
        height: 90vh;
        transition: .3s;
    }
    .nav_menu_list{
        flex-direction: column;
    }
    .nav-menu-btn{
        display: flex;
        align-items: auto;
        justify-content: center;
    }
    .featured-box{
        flex-direction: column;
        justify-content: center;
        height: 100vh;
    }
    .featured-text{
        width: 100%;
        order: 2;
        justify-content: center;
        align-content: flex-start;
        min-height: 60vh;
    }
    .social_icons{
        margin-top: 2em;
    }
    .featured-image{
        order: 1;
        justify-content: center;
        min-height: 150px;
        width: 100%;
        margin-top: 65px;
    }
    .image, .image img{
        width: 150px;
        height: 150px;
    }
    .row{
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 50px;
    }
    .col{
        display: flex;
        justify-content: center;
        width: 100%;
    }
    .about-info, .contact-info{
        width: 100%;
    }
    .project-container{
        justify-content: center;
    }
    .project-box{
        width: 80%;
    }
    .certificate-overlay img {
        max-width: 80vw; /* Smaller width */
        max-height: 70vh; /* Smaller height */
        margin-right: 2rem; /* Move to the left */
    }
    .certificate-overlay .close-btn {
        font-size: 2rem; 
        margin-top: 1rem;
    }
}

/* ----- MEDIA QUERY == 540px / RESPONSIVE ----- */

@media only screen and (max-width: 540px){
    .featured-name{
        font-size: 40px;
    }
    .project-box{
        width: 100%;
    }
    .form-inputs{
        flex-direction: column;
    }
    .input-field{
        width: 100%;
    }
    .certificate-overlay img {
        max-width: 80vw; /* Smaller width */
        max-height: 70vh; /* Smaller height */
        margin-right: 2rem; /* Move to the left */
    }
    .certificate-overlay .close-btn {
        font-size: 2rem; 
        margin-top: 1rem;
    }
    .nav-menu-btn {
        position: relative; /* Keep hidden for larger screens */
        padding: 0 8%; /* Reduced padding for better fit on smaller screens */
    }
    .nav-menu, .nav_menu_list{
        display: flex;
    }
}

/* Globe Button and Language Dropdown Styles */
.nav-lang {
    position: relative;
    display: inline-block;
    margin-left: 20px; /* Adjust spacing as needed */
    cursor: pointer;
}

#globe-btn {
    font-size: 1.5rem;
    color: #333; /* Adjust color to match your theme */
    transition: color 0.3s ease;
}

#globe-btn:hover {
    color: #6e57e0; /* Change color on hover */
}

.lang-dropdown {
    position: absolute;
    right: 0;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 1000;
    margin-top: 10px;
    
    /* Animation properties */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.3s ease,
                transform 0.3s ease,
                visibility 0.3s ease;
    transform-origin: top;
}

.lang-dropdown a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, 
                color 0.3s ease,
                transform 0.2s ease;
}

.lang-dropdown a:hover {
    background-color: #00c9ff;
    color: #fff;
    transform: translateX(5px); /* Slight movement on hover */
}

/* Show dropdown when nav-lang is hovered or clicked */
.nav-lang:hover .lang-dropdown,
.nav-lang:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Optional: Add animation for each dropdown item */
.lang-dropdown a {
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity 0.3s ease,
                transform 0.3s ease,
                background-color 0.3s ease,
                color 0.3s ease;
}

.nav-lang:hover .lang-dropdown a,
.nav-lang:focus-within .lang-dropdown a {
    opacity: 1;
    transform: translateX(0);
}

/* Delay each item's animation */
.lang-dropdown a:nth-child(1) { transition-delay: 0.1s; }
.lang-dropdown a:nth-child(2) { transition-delay: 0.2s; }
.lang-dropdown a:nth-child(3) { transition-delay: 0.3s; }