body,
html {
    padding: 0px;
    margin: 0px;
    font-family: 'Comfortaa', cursive;
    font-weight: bold;
    color: #fff;
    background: rgb(0, 0, 0);
    scroll-behavior: smooth;


}

#loading {
    width: 100vw;
    height: 100vh;
    position: fixed;
    background: #000;
    z-index: 999;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

#spinner {
    animation: rotate 0.56s infinite linear;
    width: 60px;
    height: 60px;
    border: 6px solid #fff;
    border-bottom: 6px solid #000;
    border-radius: 50%;
    margin: 0;
}

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

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

h3,
h4,
h5,
h6,
p,
span {
    text-shadow:
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000;
    /* Add a black outline */
}

#header {
    width: 80%;
    padding: 4% 10%;
    text-align: center;
    position: absolute;
    transition: 0.6s ease-in-out;
}

#header div {
    display: block;
}

#title {
    font-size: 40px;
    /*background-image: linear-gradient(to left, #41dfff 0%, #2bcaff 100%); */
    background-color: #06eeff;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 500% 500% !important;
    -webkit-animation: Gradient 20s ease infinite;
    -moz-animation: Gradient 20s ease infinite;
    -o-animation: Gradient 20s ease infinite;
    animation: Gradient 20s ease infinite;
    font-family: 'Comfortaa', cursive;
    text-shadow: 0px 0px 40px rgba(255, 255, 255, 0.5);
}

#links {
    margin: 40px 0px;
    transition: 0.6s ease-in-out;
    color: #fff;
}

#links a {
    margin: 0px 30px;
    color: inherit;
    text-decoration: none;
    transition: 0.4s ease-in-out;
    padding: 5px 8px;
    border-bottom: 2px solid transparent;
}

#links a:hover {
    border-bottom: 2px solid #fff;
}

#middle {
    width: 100%;
    height: 80vh;
    /*background: linear-gradient(0deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0)), url("https://images.unsplash.com/photo-1494587351196-bbf5f29cff42?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&&w=1351&q=80") center center fixed;*/
    background: linear-gradient(0deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0)),
        /*url("https://images.unsplash.com/photo-1519608487953-e999c86e7455?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D") center center fixed; */
        url("images/home-bg.png") center center fixed;
    /*background-size: 100% auto;*/
    background-size: cover;
    background-repeat: no-repeat;
    color: white;
    display: flex;
    justify-content: center;
    flex-direction: column;
    transition: 1s ease-in-out;
    padding-top: 20vh;
    padding-bottom: 20vh;

}

#tagline {
    font-size: 50px;
    text-shadow: 0px 0px 40px #06eeff7f;
}

#welcome {
    text-shadow: 0px 0px 40px #0000005c;
}

#or {
    font-size: 20px;
    width: 60%;
}

#portfolio {
    width: 80%;
    padding: 18% 10%;
}

#portfolio div h1 {
    padding-top: 5%;
    font-size: 40px;
    /*background-image: linear-gradient(to left, #41dfff 0%, #2bcaff 100%);*/
    background-color: #f1f1f1;
    -webkit-background-clip: text;
    background-clip: text;
    /*-webkit-text-fill-color: transparent;*/
    background-size: 500% 500% !important;
    -webkit-animation: Gradient 20s ease infinite;
    -moz-animation: Gradient 20s ease infinite;
    -o-animation: Gradient 20s ease infinite;
    animation: Gradient 20s ease infinite;
    font-family: 'Comfortaa', cursive;
}

.highlight {
    color: #ff2be6;
    /* Optional: Add some padding to make the border look better */
}

#skills {
    margin: 4vh 0 !important;
    padding: 2vh 0 !important;
    /*background: linear-gradient(0deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.1)), url("https://images.unsplash.com/photo-1573767291321-c0af2eaf5266?q=80&w=2036&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D") center center fixed;*/
    background-size: 100% auto;
    background-repeat: no-repeat;
    transition: 1s ease-in-out;
}

.icons {
    width: 70px;
    height: auto;
    margin: 10px;
    margin-bottom: 40px;
}

.categories {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    padding: 15px;
}

.skills-category {
    display: contents;
    position: relative;


}

.skills-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    /* Light blue transparent background */
    border-radius: 10px;
    /* Adjust the radius as needed */

    /* Ensure the background is behind the content */
    pointer-events: none;
    /* Allow clicks to pass through the background */
}

.skills-category h2 {
    margin: 0;
    max-width: 150px;
}

.skills-category h2 .skill-name {
    transition: opacity 0.3s ease-in-out;
}

.skills-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: left;
    gap: 15px;
}

.skill {
    text-align: left;
}

.skills-category p.description {
    margin: 0;
}

.skill img {
    transition: outline 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border-radius: 10px;
    /* Adjust the radius as needed */
}

.skill:hover img {
    outline: 2px solid #78d7fa;
    /* Glowing blue outline */
    box-shadow: 0 0 10px #78d7fa;
    /* Glowing blue shadow */
    border-radius: 10px;
    /* Ensure the border-radius is applied on hover as well */
}

.skill-name {
    color: #2bcaff;
}

#contact p {
    line-height: 2;
}

#work-bg {
    /*background: linear-gradient(0deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.1)), url("https://images.unsplash.com/photo-1600184831467-29f64598f37e?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D") center center fixed;*/
    background: linear-gradient(0deg, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.1)),
        /*make a linear gradient that fades the top of the image to black*/

        /* url("https://images.unsplash.com/photo-1573767291321-c0af2eaf5266?q=80&w=2036&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D") center center fixed; */
        /*url("https://images.unsplash.com/photo-1573767291321-c0af2eaf5266?q=80&w=2036&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D") center center fixed; */
        url("images/projects-bg.png") center center fixed;
    background-size: 100% auto;
    background-repeat: no-repeat;
    transition: 1s ease-in-out;
    margin: 10vh -10% !important;
    padding: 2vh 10% !important;
    box-shadow: inset 0 0 50px 50px rgba(0, 0, 0, 1);
}


#projects {

    background-size: 150% auto;
    background-repeat: no-repeat;
    transition: 5s ease-in-out;
}

.project {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2em;
    background-color: #1f1e1ec1;
    border-radius: 10px;
    padding: 1.5em;
    margin-left: -1.15em;
    margin-right: -1.15em;
}

.project-content {
    flex: 1;

}

.hidden {
    display: none;
}

.project-content h2,
.project h2 {
    background: #2be3ff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    /*text-fill-color: transparent;*/
}

.project img.project-img {
    max-width: 40%;
    height: auto;
    margin-left: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.project-buttons {
    margin-top: 10px;
}

#contact {
    margin: 4vh 0px !important;
    padding: 2vh 0px !important;
}

#contact form {
    width: 100%;
}

#contact form input {
    width: 46%;
    margin: 20px 1%;
    background: transparent;
    border: 0px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 10px;
    font-family: 'Comfortaa', cursive;
    font-size: 18px;
    transition: 0.4s ease-in-out;
    color: #fff;
}

#contact form textarea {
    width: 96%;
    margin: 20px 1%;
    padding: 8px 10px;
    border: 0px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding: 8px 10px;
    font-family: 'Comfortaa', cursive;
    font-size: 18px;
    background: transparent;
    resize: none;
    transition: 0.4s ease-in-out;
    color: #fff;
}

#contact form input:focus {
    outline: none;
    border-bottom: 2px solid rgba(255, 255, 255, 1);
}

#contact form textarea:focus {
    outline: none;
    border-bottom: 2px solid rgba(255, 255, 255, 1);
}

::placeholder {
    color: #fff;
}

.btn_one {
    color: white;
    padding: 10px 40px;
    border-radius: 50px;
    border: 2px solid #fff;
    font-size: 18px;
    font-family: 'Comfortaa', cursive;
    font-weight: bold;
    background: transparent;
    transition: 0.4s ease-in-out;
    margin: 30px 10px;
}

.btn_one:hover {
    background: white;
    cursor: pointer;
    color: #000;
}

.project div {
    font-weight: normal;
}

.btn_two {
    color: #000;
    padding: 10px 40px;
    border-radius: 50px;
    border: 2px solid #fff;
    font-size: 18px;
    font-family: 'Comfortaa', cursive;
    font-weight: bold;
    background: #fff;
    transition: 0.4s ease-in-out;
    margin: 30px 10px;
}

.btn_two:hover {
    background: transparent;
    cursor: pointer;
    color: #fff;
}

#details {
    margin: 6vh 0px;
}

.btn_social {
    font-size: 18px;
    color: #fff;
    margin: 40px 20px;
    padding: 15px 18px;
    border-radius: 50%;
    background: #000;
    transition: 0.4s ease-in-out;
}

.btn_social:hover {
    color: #000;
    background: #fff;
    cursor: pointer;
}

.btn_three {
    padding: 10px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-family: 'Comfortaa', cursive;
    font-weight: bold;
    background: transparent;
    transition: 0.4s ease-in-out;
    margin: 30px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0px rgba(0, 0, 0, 0.5);
    }

    50% {
        box-shadow: 0 0 10px rgba(120, 215, 250, 0.7);
    }

    100% {
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    }
}

.btn_three {
    background-color: #333;
    color: #fff;
    border: 2px solid #444;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.btn_three::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.5s ease;

}

.btn_three:hover::before {
    top: -30%;
    left: -30%;
    width: 160%;
    height: 160%;
    background: rgba(255, 255, 255, 0.2);
}

.btn_three:hover {
    background-color: #444;
    border-color: #555;
    box-shadow: 0 0 10px rgba(120, 215, 250, 0.7);
    animation: none;
}

/* Dialog CSS */
dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    /* Blur the background */
}

dialog {
    display: none;
    /* Hide the dialog by default */
    border: none;
    padding: 0;
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

dialog[open] {
    display: flex;
    /* Show the dialog when it is open */
}

dialog iframe {
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 900px) {
    #middle {
        background-size: cover;
    }

    #header {
        width: 94%;
        padding: 15% 3%;
    }

    #title {
        font-size: 30px;
    }

    #links {
        margin: 30px 0px;
    }

    #links a {
        margin: 0px;
    }

    #middle {
        width: 100%;
        border-radius: 0px;
        height: 80vh;
        background-size: cover;
    }

    #tagline {
        width: 90%;
        font-size: 30px;
    }

    .btn_one {
        font-size: 14px;
        padding: 8px 20px;
    }

    .btn_two {
        font-size: 14px;
        padding: 8px 20px;
    }

    #contact form input {
        width: 92%;
    }

    #contact form textarea {
        width: 92%;
    }

    .btn_social {
        font-size: 14px;
        margin: 10px;
        padding: 10px 11px;
    }
}

#footer {
    width: 100%;
    padding: 10vh 0px;
    text-align: center;
    font-weight: bold;
}

#footer a {
    font-size: 18px;
    background-image: linear-gradient(to left, #FF416C 0%, #FF4B2B 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 500% 500% !important;
    -webkit-animation: Gradient 20s ease infinite;
    -moz-animation: Gradient 20s ease infinite;
    -o-animation: Gradient 20s ease infinite;
    animation: Gradient 20s ease infinite;
    font-family: 'Comfortaa', cursive;
    text-decoration: none;
}

button:focus {
    outline: none;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #000;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@-webkit-keyframes Gradient {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@-moz-keyframes Gradient {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@keyframes Gradient {
    0% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }

    100% {
        background-position: 0% 50%
    }
}

@media (max-width: 600px) {

    /* Prevent horizontal scrolling and reset margins */
    #middle {
        width: 100vw;
        /* Full width of the viewport */
        height: 100vh;
        /* Full height of the viewport */
        background-size: cover !important;
        /* Ensure the background covers the entire container */
        background-position: center;
        /* Center the background image */
    }

    #links {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 5px;
        margin: 0;
        font-size: 28px;
    }

    #links a {
        margin: 0 5px !important;
        /* Override inline styles */
    }

    html,
    body {
        margin: 0;
        padding: 0;
        width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    /* Use flexbox for overall layout */
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Sections */
    #header,
    #middle,
    #skills,
    #work,
    #contact,
    #footer {
        width: 100%;
        padding: 10px 5%;
        box-sizing: border-box;
    }

    /* Header */
    #header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #title {
        font-size: 42px;
        margin: 40px 0 10px;
    }

    #links a {
        font-size: 14px;
        margin: 5px 0;
    }

    /* Middle Section */
    #middle {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    #tagline {
        font-size: 20px;
        margin: 0;
    }

    #github {
        margin-top: 40px;
    }

    #welcome {
        font-size: 30px;
    }

    .btn_one,
    .btn_two,
    .btn_three {
        font-size: 14px;
        padding: 8px 15px;
        margin: 20px;
    }

    /* Skills Section Redesigned */
    #skills {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .categories {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        align-items: center;
    }

    .skills-category {
        width: 100%;
        max-width: 400px;
    }

    .skills-category h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .skills-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .icons {
        width: 30px;
        height: auto;
        margin: 5px;
    }

    .skills-category p.description {
        font-size: 14px;
        margin-top: 10px;
    }

    /* Projects Section */
    #work {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #work-bg {
        background-size: cover !important;
        box-shadow: inset 0 0 50px 50px rgba(0, 0, 0, 1);
    }

    .project {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 20px 0;
        width: 100%;
    }

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

    .project-description {
        text-align: left;
    }

    .project img.project-img {
        width: 90%;
        max-width: 300px;
        margin: 10px 0;
    }

    /* Contact Section */
    #contact {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    #contact form input,
    #contact form textarea {
        width: 100%;
        max-width: 400px;
        margin: 10px auto;
        padding: 8px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .btn_social {
        font-size: 14px;
        padding: 8px;
        margin: 5px;
    }

    /* Footer */
    #footer {
        text-align: center;
        font-size: 14px;
    }

    dialog {
        display: none;
    }

    dialog iframe {
        width: 90%;
        /* Adjust the width to 90% of the viewport */
        height: auto;
        /* Maintain aspect ratio */
    }

}