body {
    color: white;
    background-image: linear-gradient(#233132,#345f58,#4a4a56);
    background-color: #345f58;
    margin: 0;
    padding: 0;
    margin-top: auto;
    margin-bottom: auto;
}

#heading {
    margin: 12.5%;
    margin-bottom: auto;
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.left {
    flex-direction: column;
}

.right {
    margin-left: auto;
}

hr {
    border: 1.5px solid #ccc;
    width: 100%;
    margin: 15px auto;
}

#links {
    text-align: center;
    font-size: large;
    margin: 0;
    margin-top: 20px;
    margin-bottom: 50px;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #345f58;
    border-radius: 0px;
}

div a {
    margin: 0 5%;
    text-decoration: none;
    font-weight: bold;
    color: inherit;
}

div a:hover {
    color: #cac7c7;
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 5px;
}

section {
    background-image: linear-gradient(#3c4a4e,#566c6a);
    border: 3px solid #cccccc;
    border-radius: 50px;
    padding: 20px;
    padding-bottom: 40px;
    margin-left: 12.5%;
    margin-right: 12.5%;
    margin-bottom: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

td img {
    border-style: solid;
    border-width: 3px;
    border-color: #ccc;
    border-radius: 25px;
    width: 100%;
}

#about-text h3, #about-text p{
    margin-left: 5%;
}

#about-text-ar h3, #about-text-ar p{
    margin-right: 5%;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skills-list span {
    background-color: #00000061;
    padding: 5px 10px;
    border-radius: 5px; 
    margin: 5px 0;
}

#skills {
    text-align: left;
}

#skills .headings {
    display: flex;
    justify-content: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 20px;
}

#skills h3 {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

#skills h3.active {
    font-weight: bold;
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 5px;
}

li {
    padding: 7.5px;
}

#contact-table{
    text-align: center;
    margin-left: 12.5%;
    margin-right: 12.5%;
    table-layout: fixed;
    width: 75%;
}

#contact-table td{
    width: 5%;
}

#contact a{
    text-decoration: none;
    color: inherit;
}

#contact p{
    text-decoration: underline;
    text-underline-offset: 5px;
}

footer {
    text-align: center;
    padding: 15px;
    font-size: 0.9em;
    color: #c4c4c4;
    background-color: #233132;
}

@media (max-width: 600px) {
    #links {
        flex-wrap: wrap;
    }

    div a {
        margin: 0 0.5%;
    }

    section {
        margin-left: 5%;
        margin-right: 5%;
    }

    #about-table {
        display: block;
    }

    #about-table tr {
        display: block;
    }

    #about-table td {
        display: block;
        width: 100%;
    }

    #contact-table {
        display: block;
    }

    #contact-table tr {
        display: block;
    }

    #contact-table td {
        display: block;
        width: 100%;
        text-align: center;
    }

    #about-text {
        text-align: left;
    }

    td img{
        width: 350%;
    }

    #return{
        margin-bottom: 50%;
    }

    #return a {
        display: inline;
        padding-bottom: 10px;
    }
}

#to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 44px;
    height: 44px;
    border-radius: 22px;
    border: 2px solid #ccc;
    background-color: #233132;
    color: white;
    z-index: 1100;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease-in-out;
}
#to-top.show {
    opacity: 1;
    pointer-events: auto;
}
#to-top:hover {
    background-color: #345f58;
}
html[lang="ar"] #to-top {
    right: auto;
    left: 20px;
}
