body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

#navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #060605;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    z-index: 1000;
    transition: padding 0.3s ease;
}

#navbar.shrink {
    padding: 0px;
}

#navbar .navbar-brand {
    color: cyan;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 10px;
    position: relative;
    display: inline-block;
}

.navbar-brand.page-scroll {
    letter-spacing: 1px;
    font-size: 1.2em;
}

#navbar a:hover {
    color: skyblue;
}

#navbar .nav-link {
    color: cyan;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    padding: 10px;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

#navbar .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 5px;
    background-color: cyan;
    transition: width 0.4s ease-in-out, left 0.4s ease-in-out;
}

#navbar a:hover::after {
    width: 100%;
    left: 0;
    right: 0;
}

#navbar a.active::after {
    width: 0;
}

#navbar a.active {
    color: #000000;
    background-color: #39b7b7;
    border-radius: 5px;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 1.2em;
    font-weight: bolder;
}

.navbar-logo {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.navbar-brand {
    background-color: transparent;
    transition: background-color 0.3s ease;
}

.navbar-brand:hover .navbar-logo {
    transform: scale(1.1);
}

.navbar-brand:active .navbar-logo {
    background-color: none;
    transform: scale(0.9);
}

.navbar-brand:focus {
    outline: none;
    background-color: transparent;
}

.navbar.shrink {
    padding: 5px 0;
}

#welcome-section {
    background: url('https://images.unsplash.com/photo-1442323794357-25b2ec110967?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgb(20, 3, 132);
    font-size: 40px;
    padding-top: 20px;
    margin-bottom: 50px;
}

#greeting-message {
    font-size: 30px;
    font-weight: bolder;
    color:  black;
    opacity: 0;
    padding-bottom: 0px;
}

#welcome-name {
    font-size: 50px;
    font-weight: bolder;
    padding-top: 0px;
    margin-bottom: 20px;
}

#welcome-jobtitle {
    font-size: 30px;
    font-weight: bolder;
    color: black;
    opacity: 0;
    margin-top: 10px;
}

.down-arrow {
    position: absolute;
    bottom: 30px;
    left: 50%;
    width: 50px;
    height: 50px;
    transform: translateX(-50%);
    cursor: pointer;
    animation: bounceArrow 1s infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.down-arrow::before {
    content: '';
    display: block;
    width: 15px;
    height: 15px;
    border-left: 5px solid #FFFFFF;
    border-bottom: 5px solid #FFFFFF;
    transform: rotate(-45deg);
    margin: 0 auto;
}

.down-arrow:hover {
    background: linear-gradient(45deg, #0072ff, #00c6ff);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.down-arrow:hover::before {
    border-color: #FFD700;
}

#about {
    background: url('https://images.unsplash.com/photo-1501959181532-7d2a3c064642?q=80&w=1793&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center;
    background-size: cover;
    font-size: 1em;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#about h2 {
    font-weight: bold;
    margin-top: 40px;
    margin-bottom: 20px;
}

.about-content {
    background: rgba(0, 0, 0, 0.6);
    padding: 25px;
    border-radius: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.about-content p {
    font-size: 18px;
}

.about-content a {
    color: cyan;
    text-decoration: none;
    white-space: nowrap;
}

.lang {
    color: cyan;
}

.lang:hover {
    text-decoration: none !important;
    color: cyan !important;
}

.about-content span:hover {
    color: lightcyan;
    text-decoration: underline;
}

.about-content, .skills-list,.project-tile, form, .social-media {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.profile-pic-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    cursor: pointer;
}

.profile-pic-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    cursor: pointer;
}

.profile-pic {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 5px solid cyan;
    transition: transform 0.3s ease-in-out, border 0.3s ease-in-out;
    animation: bounce 2s infinite;
    position: relative;
    z-index: 1;
}

.profile-pic-container:hover .profile-pic {
    transform: scale(1.2);
}

.profile-pic.zoomed {
    transform: scale(1.4);
}

.profile-pic-container:hover .profile-pic::after,
.profile-pic.zoomed {
    animation: pop 0.2s ease-in-out;
    border-color: linear-gradient(45deg, cyan, magenta, yellow, cyan);
}

#skills {
    background: url('https://images.unsplash.com/photo-1480506132288-68f7705954bd?q=80&w=1840&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center;
    background-size: cover;
    font-size: 1em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

#skills h2 {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 20px;
}

#projects {
    background: url('https://images.unsplash.com/photo-1524169358666-79f22534bc6e?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center;
    background-size: cover;
    font-size: 1em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding-top: 70px;
    margin-top: 50px;
}

#projects h2 {
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 0px;
}

#resume {
    background: url('../images/resume-background.jpg') no-repeat center center;
    background-size: cover;
    font-size: 1em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 20px;
}

.resume-title {
    font-size: 2.1em;
    font-weight: bolder;
    margin-bottom: 20px;
    animation: pulse 1s infinite;
}

.resume-button {
    font-size: 1.5em;
    font-weight: bold;
    color: #000000;
    background-color: #39b7b7;
    padding: 15px 30px;
    margin-top: 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, border 0.3s ease;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
}

.resume-button:hover {
    background-color: #33a2a2;
    color: #ffcc00;
    border-left: 15px solid #ffcc00;
    border-right: 15px solid #ffcc00;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

#contact {
    background: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=M3wxMTI2MjZ8MHx8fGFsbHwxfHx8fHx8fDE2MjA4NjUzMTQ&ixlib=rb-1.2.1&q=80&w=1080');
    background-size: cover;
    background-attachment: scroll;
    font-size: 1em;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    min-height: calc(90vh - 50px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 40px;
    padding-bottom: 0px;
}

#contact h2 {
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 20px;
}

#contact .or-text {
    color: #ffffff;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

form {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 500px;
    max-height: 270px;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.form-group {
    max-height: 50px;
    position: relative;
}

.form-label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #000000;
    font-weight: bold;
    transition: all 0.3s ease;
    background-color: #fff;
    padding: 0 5px;
}

.form-control:focus + .form-label, .form-control:hover + .form-label, .form-control:not(:placeholder-shown) + .form-label {
    top: -15px;
    font-size: 16px;
    font-weight: bold;
    color: darkblue;
    transform: translateY(0%);
}

textarea.form-control {
    height: 300px;
    resize: none;
}

form button {
    width: 100%;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    width: 100%;
    position: relative;
    bottom: 10px;
}

.rocket-btn {
    background-color: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    display: inline-block;
    margin-left: 0px;
    outline: none;
}

.rocket-btn img {
    width: 30px;
    height: 30px;
}

.rocket-btn:hover {
    transform: scale(1.2);
}

.rocket-btn:focus {
    outline: none;
}

.hover-text {
    visibility: hidden;
    width: auto;
    background-color: black;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 100%;
    left: 50%;
    margin-top: -40px;
    margin-bottom: -50px;
    margin-left: -40px;
    margin-right: -40px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 9px;
}

.rocket-btn:hover .hover-text {
    visibility: visible;
    opacity: 1;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0px;
}

.project-tile {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, opacity 0.3s;
}

.project-tile.hidden,
.skill-item.hidden {
    opacity: 0;
}

.project-tile.animate-fadein,
.skill-item.animate-fadein {
    animation: fadeIn 0.8s ease-in-out forwards;
    opacity: 1;
}

.project-image {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    display: block;
}

.project-tile:hover img {
    transform: scale(1.2);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(50, 50, 50, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    justify-content: center;
    align-items: center;
    display: flex;
}

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

.text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-tile:hover .text-overlay {
    opacity: 1;
}

.overlay .text {
    font-size: 1.2em;
    font-weight: bold;
    color: cyan;
    text-align: center;
}

.zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25px;
    color: cyan;
    display: none;
    z-index: 1;
}

.project-tile:hover .zoom-icon {
    display: block;
}

.skills-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-gap: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 10px;
}

.icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    margin: 0;
}

.skills-icons-container {
    background-color: white;
    border-radius: 10px;
}

#profile-link {
    display: block;
    text-align: center;
    margin: 20px;
    font-size: 20px;
    color: #39b7b7;
}

#social-links-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding: 10px;
    padding-right: 35px;
    padding-left: 35px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

.social-icon {
    font-size: 32px;
    color: cyan;
    text-decoration: none;
    transition: transform 0.3s ease-in-out, color 0.3s ease-in-out;
}

.social-icon:hover {
    color: #0073b1;
    transform: scale(1.3);
}

.tooltip-text {
    visibility: hidden;
    width: 60px;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    color: black;
    text-align: center;
    padding: 5px;
    border-radius: 10px;
    position: absolute;
    z-index: 1;
    bottom: 85%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.2s;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0px 5px 10px rgba(255, 0, 255, 0.4);
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #00ffff transparent transparent transparent;
}

.social-icon:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(50, 50, 50, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    max-height: 105%;
    overflow: hidden;
    width: 80%;
    max-width: 700px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid #ccc;
}

#modalTitle {
    background: linear-gradient(145deg, #005bbb, #0077ff);
    font-size: 1.5em;
    font-weight: bold;
    color: cyan;
    margin: -20px -20px 20px -20px;
    padding: 20px 0;
    text-align: center;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    letter-spacing: 1px;
}

.modal-scroll-container {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 140px);
}

.modal-image img {
    width: 400px;
    height: 280px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    margin-top: -20px;
    margin-bottom: -10px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
}

.modal-description {
    font-size: 1.1em;
    color: #333;
    padding-top: 20px;
    line-height: 1.8;
    text-align: center;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 16px;
    margin-bottom: -4px;
}

#visitSourceBtn, #visitSiteBtn {
    padding: 10px 20px;
    background-color: #0077ff;
    color: #fff;
    border: none;
    outline: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1em;
    font-weight: bold;
    text-transform: uppercase;
}

#visitSourceBtn:hover, #visitSiteBtn:hover {
    background-color: #005bbb;
    color: cyan;
    transform: scale(1.05);
}

#myModal .or-text {
    font-size: 1.2em;
    font-weight: bolder;
    margin-top: 12px;
    color: #000000;
}

/* The close button */
.close-modal {
    position: fixed;
    top: 30px;
    right: 305px;
    width: 35px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.close-modal:hover {
    background-color: red;
}

.close-modal span {
    display: inline-block;
}

.close-modal:focus {
    outline: none;
}

.close-modal:active {
    outline: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInFromBottom {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; } 
}

@keyframes slideInFromTop {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; } 
}

@keyframes rotateOnce {
    from {
        transform: rotateY(0deg);
    }
    to {
        transform: rotateY(360deg);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes shake {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes popIn {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.pop {
    display: inline-block;
    animation: popIn 0.7s infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes bounceArrow {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, 10px);
    }
}

.section {
    transition: transform 0.5s ease-in-out;
}

.push-up {
    transform: translateY(-100vh);
}

.navbar.shrink {
    padding: 5px 0;
}

.hidden {
    visibility: hidden;
}

.animate-links span {
    display: inline-block;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.shake {
    display: inline-block;
    animation: shake 0.5s infinite;
}

.bounce {
    animation: bounce 2s infinite;
}

.rotate-animation {
    animation: rotateOnce 1.5s ease forwards;
    perspective: 1000px;
}

.animate-up {
    animation: fadeInUp 0.8s ease-in-out forwards;
    opacity: 1;
}

.animate-fadein {
    animation: fadeIn 3s ease-in-out;
    animation-fill-mode: forwards;
}

.animate-slidein {
    animation: slideInFromBottom 2s;
    animation-fill-mode: forwards;
}

.animate-slidein-top-delay {
    animation: slideInFromTop 2s;
    animation-fill-mode: forwards;
}

/*Media Queries*/
@media (max-width: 1400px) {
    #projects h2 {
        margin-top: 6px;
    }

    #contact h2 {
        margin-top: 35px;
    }

    .projects-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .skills-list {
        grid-template-columns: repeat(7, 1fr);
    }
}

@media (max-width: 1007px) {
    #about h2 {
        margin-top: 60px;
    }

    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }

    #skills h2 {
        margin-top: 40px;
    }

    .skills-list {
        grid-template-columns: repeat(7, 1fr);
    }

    .about-content, form {
        width: 90%;
        padding: 10px;
    }

    #navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    #navbar a {
        padding: 10px 0;
    }
    
    .close-modal {
        top: 30px;
        right: 130px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .modal-content {
        width: 100%;
    }

    .modal-image img {
        width: 350px;
        height: 230px;
        object-fit: cover;
        display: block;
        margin: 0 auto;
        margin-top: -20px;
        margin-bottom: -10px;
        border-radius: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 719px) {
    #navbar {
        align-items: center;
    }

    .about-content {
        grid-template-columns: auto;
    }

    .projects-container {
        grid-template-columns: repeat(1, 1fr);
    }

    #skills h2 {
        margin-top: 50px;
    }
    
    .skills-list {
        grid-template-columns: repeat(4,1fr);
    }

    #contact h2 {
        margin-top: 50px;
    }

    .close-modal {
        top: 30px;
        right: 30px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }

    .modal-content {
        width: 100%;
    }

    .modal-image img {
        width: 280px;
        height: 230px;
        object-fit: cover;
        display: block;
        margin: 0 auto;
        margin-top: -20px;
        margin-bottom: -10px;
        border-radius: 20px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    }
}