html {
    scroll-behavior: smooth;
    scroll-padding-top: 5vh;
}
body {
    margin-right: 0;
    margin-top: 0;
    margin-left: 0;
    margin-bottom: 0;
    font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
    --bg-color: #000000;
    --text-color: #ffffff;
    --p-color: #e1e1e1;
    --Xinyang-Cheng: #ffffff;
    --default-hover-color: rgb(135,206,250);
    --inline-hover-color: rgb(0, 157, 255);
    --link: rgb(166, 70, 255);
    --avatar-border: #161616;
    --badge-color-1: rgb(255, 255, 255);
    --badge-color-2: rgb(211, 211, 211);
    --badge-color-3: rgb(128, 128, 128);
    --divisor: rgb(181, 181, 181);
    --icon-envelope: #fff;
    --icon-github: #fff;
    --icon-dot: #fff;
    --button-color: rgb(102, 2, 102);
    --button-color-hover: rgb(255, 193, 255);
    --sun-color: #fff;
    --sun-color-hover: rgb(255, 42, 0);
    background-color: var(--bg-color);

    /* mobile version only */
    --loc-narrow: rgb(255, 255, 255);
}

body[data-theme='light_theme'] {
    --bg-color: #fff;
    --text-color: #000000;
    --p-color: #000000;
    --Xinyang-Cheng: #000000;
    --default-hover-color: rgb(135,206,250);
    --inline-hover-color: rgb(0, 78, 138);
    --link: rgb(0, 0, 255);
    --avatar-border: #f2f3f3;
    --badge-color-1: rgb(0, 0, 0);
    --badge-color-2: rgb(128, 128, 128);
    --badge-color-3: rgb(211, 211, 211);
    --divisor: rgb(181, 181, 181);
    --icon-envelope: #000000;
    --icon-github: #333;
    --icon-dot: #000000;
    --button-color: rgb(255, 255, 125);
    --button-color-hover: rgb(41, 0, 41);
    --sun-color: #000;
    --sun-color-hover: rgb(255, 255, 0);
    background-color: var(--bg-color);

    /* mobile version only */
    --loc-narrow: rgb(128, 128, 128);
}

/* Navbar */
.navbar {
    position: sticky;
    top: -1px;
    z-index: 3;
    border-top: 3px solid darkgrey;
    border-bottom: 1px solid lightgrey;
    background-color: var(--bg-color);
    padding: 1.5vh;
    font-size: 5vh;
    display: flex;
    justify-content: flex-start;
    font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
}
.navbar-narrow {
    display: none;
}
.navbar-item {
    padding-right: 5%;
}
.anim-text {
    transition: all 0.5s ease;
    color: var(--text-color);
}
.anim-text:hover {
    transform: scale(1.05);
}
.anim-text-2 {
    transition: all 0.5s ease;
    color: grey;
}
.anim-text-2:hover {
    transform: scale(1.05);
    color: var(--Xinyang-Cheng)
}
#theme-button {
    height: 40px;
    width: 40px;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 8vw;
    background-color: var(--button-color);
    transition: all ease-in-out 0.3s;
}
.fa-sun {
    transition: all ease-in-out 0.3s;
    color: var(--sun-color);
    font-size:large;
}
.fa-moon {
    transition: all ease-in-out 0.3s;
    color: var(--sun-color);
    font-size:large;
}
#theme-button:hover {
    background-color: var(--button-color-hover);
}
#theme-button:hover .fa-sun {
    color: var(--sun-color-hover);
}
#theme-button:hover .fa-moon {
    color: var(--sun-color-hover);
}
/* Main Page */
.page-wrapper {
    margin-left: 10%;
    margin-right: 10%;
    margin-top: 5%;
    margin-bottom: 15%;
    padding-left: 1rem;
    padding-right: 1rem;
    display: flex;
    flex-direction: row;
    justify-content:space-around;
    font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
}

/* Side Menu */
.sidebar-block {
    height: auto;
    width: auto;
    position: sticky;
    top: 10%;
    z-index: 2;
    animation: slideInFromBottom 0.5s ease-out;
}

.author_avatar {
    border-radius: 50%;
    padding: 1px;
    border: 1px solid var(--avatar-border);
    max-width: 175px;
}
.author_name {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-color);
    margin-top: 5%;
}

.contact-list {
    margin-top: 7%;
    list-style: none;
    padding: 0;
}

.contact {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 20px;
}

.contact i {
    margin-right: 8px;
    width: 30px;
    text-align: center;
}
#loc {
    color: var(--icon-dot);
}
#loc:hover {
    cursor: pointer;
}
#weixin {
    display: block;
}
#wecom:hover {
    color: #7bb32e;
    cursor: pointer;
}
#ins:hover {
    color: #e4405f;
}
#email:hover {
    color: darkkhaki;
}
#github:hover {
    color: grey;
}
#LinkedIn:hover {
    color: #0077b5;
}
#discord:hover {
    color: #7289da;
}
#weixin:hover {
    color: #7bb32e;
}
#book:hover {
    color: goldenrod;
}

/* icon color */
.fa-location-dot { color: var(--icon-dot); }
.fa-envelope { color: var(--icon-envelope); }
.fa-linkedin { color: #0077b5; }
.fa-github { color: var(--icon-github); }
.fa-instagram { color: #e4405f; }
.fa-weixin { color: #7bb32e; }
.fa-discord { color: #7289da; }
.fa-book-open { color: var(--icon-envelope); }

/* WeCom overlay effect */
#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.8);
    z-index: 15;
}
  
#text{
    position: absolute;
    display: flex;
    align-items: center;
    top: 10%;
    font-size: 50px;
    color: #0082ef;
}
#mobile-text-mobile {
    display: none;
}

.wecom-button {
    position: absolute;
    top: 75%;
}
.wecom-button:hover {
    background-color: #7bb32e;
}

/* main text */
.main-paragraph {
    padding-left: 6%;
    padding-right: 16%;
    font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
    animation: slideInFromBottom 0.5s ease-out;
}
h1 {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-color);
}
h2 {
    font-size: 1.4rem;
    color: var(--text-color);
}
a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
}
#inline-hyperlink {
    color: var(--link);
    text-decoration: underline;
}
#inline-hyperlink:hover {
    color: var(--inline-hover-color); 
}
a:hover {
    color: var(--default-hover-color);    /* default link color usage */
}
p, li {
    font-size: 1.2rem;
    line-height: 150%;
    color: var(--p-color);
}

/* lines for division and responding navbar */
.grey-line {
    height: 1px;
    width: 100%;
    background-color: var(--divisor);
}
.hidden-line {
    height: 1px;
    width: 100%;
    background-color: var(--bg-color);
}

.navbar-link-narrow {
    display: none;
}

/* animations */
@keyframes slideInFromBottom {
    0% {
      opacity: 0;
      transform: translateY(5vh); 
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
}
@keyframes fading {
    0% {
        opacity: 1;
        display: block;
    }
    100% {
        display: none;
        opacity: 0;
    }
}
@keyframes entering {
    0% {
        opacity: 0;
        display: none;
    }
    50% {
        opacity: 0;
        display: none;
    }
    100% {
        opacity: 1;
        display: block;
    }
}

/* tech stack display */
.stack-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3%;
}
.hexagon-container {
    perspective: 1000px;
    width: 100px;
    height: 115.47px; /* approximated calculation */
    margin: 5px;
    margin-left: 1.5vw;
    margin-right: 1.5vw;
}
.hexagon {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}
.hexagon-container:hover .hexagon {
    transform: rotateY(180deg); 
}
.make-hex-front, .make-hex-back {
    position: absolute;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; 
    backface-visibility: hidden;
}
.make-hex-front {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(150deg, var(--badge-color-1), var(--badge-color-2), var(--badge-color-3));
}
.make-hex-back {
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(150deg, var(--badge-color-1), var(--badge-color-2), var(--badge-color-3));
    transform: rotateY(180deg);
    color: var(--bg-color);
}
.make-hex-front img {
    width: 70%;
}

/* mobile template */
.author-avatar-narrow {
    display: none;
}
#mobile-mobile {
    display: none;
}
.loc-narrow {
    display: none;
}
.day-night-button {
    display: none;
}

/* Map-Widget */
.hide-for-mobile {
    margin-left: 3%;
    margin-top: 11%;
    width: 500px; 
}
.hide-for-mobile script {
    object-fit: contain;
}

/* mobile responsive */
@media(max-width: 995px){
    .navbar {
        display: none;
    }
    #small-name {
        color: var(--text-color);
    }
    .icon-narrow {
        color: var(--text-color);
    }
    .navbar-narrow {
        position: sticky;
        top: -1px;
        z-index: 3;
        background-color: var(--bg-color);
        align-items: center;
        font-size: 3.5vh;
        border-top: 3px solid darkgrey;
        border-bottom: 1px solid lightgrey;
        padding: 0.5vh;
        display: flex;
        justify-content: space-around;
        font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
    }
    .navbar-item {
        padding-right: 1%;
    }
    .author_avatar {
        display: none;
    }
    .author_name {
        display: none;
    }
    .contact-list {
        display: none;
    }
    .author-avatar-narrow {
        display: flex;
        border-radius: 50%;
        width: 10%;
        height: 10%;
    }
    #mobile-mobile {
        display: block;
        color: grey;
    }
    .page-wrapper {
        margin-left: 0;
        margin-right: 0;
        margin-top: 5%;
        margin-bottom: 15%;
    }
    .main-paragraph {
        padding-left: 3%;
        padding-right: 3%;
        font-family: -apple-system,".SFNSText-Regular","San Francisco","Roboto","Segoe UI","Helvetica Neue","Lucida Grande",Arial,sans-serif;
    }
    .main-text {
        padding: 0%;
    }
    .loc-narrow {
        display: flex;
        color: var(--loc-narrow);
    }
    .hide-for-mobile {
        display: none;
    }
    .day-night-button {
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
    .switch {
        position: relative;
        display: inline-block;
        width: 60px;
        height: 34px;
        margin-left: 10px;
    }

    /* Hide default HTML checkbox */
    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }
      
    /* The slider */
    .slider {
        position: absolute;
        cursor: pointer;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #ccc;
        -webkit-transition: .4s;
        transition: .4s;
    }
      
    .slider:before {
        position: absolute;
        content: "";
        height: 26px;
        width: 26px;
        left: 4px;
        bottom: 4px;
        background-color: white;
        -webkit-transition: .4s;
        transition: .4s;
    }
      
    input:checked + .slider {
        background-color: #f3d421;
    }
      
    input:focus + .slider {
        box-shadow: 0 0 1px #f3d421;
    }
      
    input:checked + .slider:before {
        -webkit-transform: translateX(26px);
        -ms-transform: translateX(26px);
        transform: translateX(26px);
    }
      
    /* Rounded sliders */
    .slider.round {
        border-radius: 34px;
    }
      
    .slider.round:before {
        border-radius: 50%;
    }
    #text {
        display: none;
    }
    #mobile-text-mobile {
        position: absolute;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        top: 26%;
        font-size: 20px;
        color: #0082ef;
        justify-content: center;
    }
}

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

/* button */
.button-frame {
    width: 100%;
    margin-top: 3vh;
    margin-bottom: 2vh;
    flex-direction: row;
    display: flex;
    justify-content: center;
    align-items: center;
}
button {
    cursor: pointer;
}
/* footer's independent color */
#footer-text {
    color: white;
}