@import url('https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap');

:root {
    --bg-color: #f0f8ff
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

section {
    position: relative;
    background-color: var(--bg-color);
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.5s;
}

section.dark {
    --bg-color: #24292d;
}

section .card {
    position: relative;
    width: 400px;
    height: 450px;
    background: #fff;
    box-shadow: 0px 15px 25px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.5s;
}

section.dark .card {
    background: #323840;
}

section .card .content,
section .card .image-text {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

section .card .image-text .image-box {
    position: relative;
    width: 180px;
    height: 180px;
    overflow: hidden;
    border-radius: 50%;
    margin-bottom: 15px;
}

section .card .image-text .image-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

section .card .image-text h3 {
    font-weight: 500;
    font-size: 1.4em;
    line-height: 1.2em;
    text-align: center;
    color: #2fa1ff;
}

section .card .image-text h3 span {
    font-weight: 400;
    color: #777;
    font-size: 0.75em;
}

section.dark .card .image-text h3 span {
    color: #ccc;
}

section .card .sci {
    display: flex;
    margin-top: 15px;
}

section .card .sci li {
    list-style: none;
    border-radius: inherit;
}

section .card .sci li a {
    position: relative;
    width: 50px;
    height: 50px;
    background: #e9f5ff;
    color: #2fa1ff;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    border-radius: inherit;
    font-size: 20px;
    transition: 0.5s;
    /* Look here */
}

section.dark .card .sci li a {
    background: #404852;
}

section .card .sci li a:hover {
    color: #fff;
}

section .card .sci li a .fa {
    position: relative;
    z-index: 1000;
}

section .card .sci li a:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #2fa1ff;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.5s;
}

section .card .sci li a:hover:before {
    transform: scale(1);
}

.toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.5s ease-in-out;
    font-size: 1.5em;
}

.toggle::before {
    content: '🌑';
    border-radius: inherit;
    overflow: hidden;
}

section.dark .toggle::before {
    content: '☀️';
    border-radius: inherit;
    overflow: hidden;
}

.con-tooltip {
    transition: all 0.3s ease-in-out;
    border-radius: 50%;
}

section.dark .tooltip {
    background: #333;
    color: #ccc;
}

.tooltip {
    visibility: hidden;
    pointer-events: none;

    z-index: 2000;
    opacity: .40;

    width: auto;
    padding: 5px 10px 5px 10px;
    white-space: nowrap;

    background: #f0f8ff;
    color: #777;

    position: absolute;
    top: -140%;
    left: -25%;

    font-size: 16px;
    border-radius: 9px;

    transition: all 0.3s ease-in-out;

    box-shadow: 0px 0px 3px rgba(56, 54, 54, 0.86);
}

.tooltip::after {
    content: '';
    width: 0;
    height: 0;

    border-style: solid;
    border-width: 12px 12.5px 0 12.5px;
    border-color: #f0f8ff transparent transparent transparent;

    position: absolute;
    left: 40%;
}

section.dark .tooltip::after {
    border-color: #333 transparent transparent transparent;
}

.toggle:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transition: .3s ease-in-out;
    animation: hoverY 1s ease-in-out infinite alternate;
}

.con-tooltip.bottom:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transition: .3s ease-in-out;
    animation: hoverY 1s ease-in-out infinite alternate;
}

@keyframes hoverY {
    0% {
        transform: translateY(6px);
    }
}

.con-tooltip.left:hover .tooltip,
.con-tooltip.right:hover .tooltip {
    visibility: visible;
    opacity: 1;
    transition: .3s ease-in-out;
    animation: hoverX 1s ease-in-out infinite alternate;
}

@keyframes hoverX {
    0% {
        transform: translateX(6px);
    }
}

/* Tooltip hover */

.con-tooltip.left:hover {
    transform: translateX(-6px)
}

.con-tooltip.bottom:hover {
    transform: translateY(6px)
}

.con-tooltip.right:hover {
    transform: translateX(6px)
}

/* Left */

.left .tooltip {
    top: 10%;
    left: -165%;
}

.left .tooltip::after {
    top: 40%;
    left: 84%;
    transform: rotate(-90deg);
}

/* Bottom */

.bottom {
    margin-left: 25px;
    margin-right: 25px;
}

.bottom .tooltip {
    top: 80%;
    left: -40%;
}

.bottom .tooltip::after {
    top: -17%;
    transform: rotate(180deg);
}

/* Right */

.right .tooltip {
    top: 10%;
    left: 90%;
}

.right .tooltip::after {
    top: 40%;
    left: -12%;
    transform: rotate(90deg);
}

/* Toggle */

.toggle .tooltip {
    top: 120%;
    left: -250%;
    font-size: 12px;
}

.toggle .tooltip::after {
    top: -20%;
    left: 70%;
    transition: 0.3s ease-in-out;
    transform: rotate(180deg);
}

html,
body {
    width: 100%;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    overflow-x: hidden;
}

/* iOS specific "fix"? */
body {
    background-color: var(--bg-color);
    background-attachment: fixed;
    background-origin: border-box;
    background-clip: border-box;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}
