/* 
 * source code provided by Illia chaban
 * This source is used for the social media link classes
 * where we get the animation that duplicates each of the
 * links transposed on top of each other
 */

body {
    --color-bright: #ffffff;
    --color-orange: #97c6da;
    --body-background-color: #ffffff;
    background-image: url('./images/homepage.jpeg');
    background: var(--body-background-color);
}

#intro {
    color: var(--color-bright);
    position: relative;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    margin-left: 33px;
    margin-top: 100px;
}

html, body, #contact-info {
    width:100%;
    height:100%;
}

#contact-info {
    display: flex;
    justify-content: left;
    align-items: left;
    //margin-left: 50px; // The margin is where the social links begin from
                         // I want this to be left aligned with no margin
}

#contact-info .links {
    display: flex;
    min-width: 300px;
    justify-content: space-between;
}

#contact-info a {
    text-decoration: none;
    color: var(--color-bright);
    font-size: 2rem;
}



/* ****************** */
/* PREVENTING FLICKERING ON HOVER BECAUSE OF ROTATING AND SKEW TRANSFORMATIONS*/
#contact-info .links a {
    display: block;
    position: relative;
}

#contact-info .links a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid transparent;
    transition: all .3s;
}

#contact-info .links a:hover::after {
    /* transform: rotate(35deg) skew(-20deg); */
    --transformed-box-diagonal-length: 164%;
    width: var(--transformed-box-diagonal-length);
    left: calc( (100% - var(--transformed-box-diagonal-length)) / 2 );
}
/* ****************** */


#contact-info .links a div {
    position: relative;
    display: block;
    width: 55px; 
    height: 55px;
    transition: transform .3s;
}


#contact-info .links a:hover div {
    transform: rotate(-35deg) skew(20deg);
}

.links a span {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 0.5s;
    /* transition-property: opacity, transform;
    *   transition-duration: 0.5s; */
    border: 1px solid var(--color-bright);
    /* border-color: var(--color-bright); */
    border-radius: 5px;
}

.links a span:nth-child(5) {
    display: flex; 
    justify-content: center;
    align-items: center;

    position: relative;
    /* border-color: var(--color-bright); */
}

.links a:hover span:nth-child(5) {
    transform: translate(20px, -20px);
    opacity: 1;

}
.links a:hover span:nth-child(4) {
    transform: translate(15px, -15px);
    opacity: .8;
}
.links a:hover span:nth-child(3) {
    transform: translate(10px, -10px);
    opacity: .6;
}
.links a:hover span:nth-child(2) {
    transform: translate(5px, -5px);
    opacity: .4;
}
.links a:hover span:nth-child(1) {
    opacity: .2;
}

/* orange background spans */
.links a.orange-background span {
    background: var(--color-orange);
    border-color: var(--color-bright);
}
.links a.orange-background span:nth-child(5) {
    background: var(--body-background-color);
}


/* orange shadow */
.links a.orange-shadow:hover span {
    box-shadow: -1px 1px 3px var(--color-orange);
}

/* orange border  */
.links a.orange-border span {
    border-color: var(--color-orange);
}
.links a.orange-border span:nth-child(5) {
    border-color: var(--color-bright);
}

