* {
    box-sizing: border-box;
}
:root {
    --darkBlack: rgb(43, 43, 43);
    --darkGrey: #6c757d;
    --lightGrey: #939393;
    --darkGreen: #799664;
    --lightGreen: #96bb7c;
    --selectionBgColor: #daf2fd;
    --linkColor: #86d7f7;
    --linkActiveColor: #9bddf7;
    --workExp-colorGreen: #9dbf85;
    --workExp-bgGreen: #f4f8f2;
    --bgGrey: #f8f9fa;
    --breakpoint-lg: 992px;
    --breakpoint-sm: 768px;
    --transition-all: all 0.3s ease;
}
body {
    font-family: "Nunito", "Noto Sans Traditional Chinese", sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}
::selection {
    background: var(--selectionBgColor);
}
a {
    text-decoration: none;
}

.hyperLink {
    position: relative;
}
.hyperLink:link {
    color: var(--linkColor);
}
.hyperLink:visited,
.hyperLink:hover {
    color: var(--linkActiveColor);
}
.hyperLink:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    background-color: var(--linkActiveColor);
    height: 2px;
    width: 0;
    transition: var(--transition-all);
}
.workExp:hover .hyperLink:after {
    left: 0;
    width: 95%;
}

ul {
    list-style-type: none;
}
.header-container {
    position: relative;
    width: 100%;
    height: 100vh;
}
.bg {
    width: 100%;
    height: 100vh;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    background-image: url("../images/header-image.jpg");
}
header {
    position: relative;
}
header .intro {
    position: absolute;
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

nav {
    position: absolute;
    flex-wrap: wrap;
    top: 0;
    left: 0;
    z-index: 1;
    width: 100%;
    padding: 25px 0;
}
.nav-container {
    position: relative;
}
.logo {
    position: absolute;
    background-image: url("../images/icon-cat.png");
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 50px;
    width: 1.7em;
    height: 1.7em;
    transition: all 0.5s ease;
}
.logo:hover {
    transform: rotate(30deg) !important;
}
.links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

nav a {
    display: block;
    text-decoration: none;
    margin: 0 20px;
    color: white;
    opacity: 0.5;
    font-size: 1em;
}
nav a,
.toggle-button {
    transition-property: opacity;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}
.active {
    opacity: 1;
}
nav li:hover a {
    opacity: 1;
}
nav .toggle-button {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    cursor: pointer;
    display: none;
    margin: 0 50px;
    opacity: 0.5;
}
nav .bar {
    width: 25px;
    height: 2px;
    background-color: white;
    margin: 5px 0;
}
nav .toggle-button:hover {
    opacity: 1;
}
.scrolled {
    position: fixed;
    background-color: white;
    margin-top: -110px;
    box-shadow: 0 0 10px var(--lightGrey);
}
.awake {
    margin-top: 0px;
    transition: var(--transition-all);
}
.sleep {
    transition: var(--transition-all);
}
.awake .links a {
    color: black;
}
.awake .toggle-button .bar {
    background-color: black;
}
.awake .logo {
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--lightGrey);
}

.main-container {
    padding: 100px 50px;
    margin: 0 auto;
    width: var(--breakpoint-lg);
}

#myBio {
    display: flex;
    flex-wrap: wrap;
    height: auto;
}

#myBio .myBio-img {
    width: 60%;
    padding: 0 100px 0 20px;
}
#myBio .myBio-img img {
    width: 100%;
    height: 80vh;
    object-fit: cover;
    object-position: 60% 100%;
}
#myBio .myBio-intro {
    width: 40%;
}
#myBio .myBio-intro .text,
#myBio .myBio-intro .skill {
    padding-bottom: 30px;
}
#myBio .myBio-intro .button a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 1em;
    padding: 15px 30px;
    border-radius: 30px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}
#myBio .myBio-intro .hireMe {
    background-color: var(--lightGreen);
}
#myBio .myBio-intro .hireMe:hover {
    background-color: var(--darkGreen);
}
#myBio .myBio-intro .cv {
    background-color: var(--darkGrey);
}
#myBio .myBio-intro .cv:hover {
    background-color: var(--lightGrey);
}

#myPortfolio .portfolio-title {
    margin-bottom: 10px;
}
.container-title {
    width: 100%;
    text-align: center;
    margin-bottom: 100px;
}

#myPortfolio {
    display: block;
    text-align: center;
}
.classification {
    width: 100%;
}
.classification ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding: 0;
}
.classification li {
    padding: 10px 20px;
    color: var(--lightGrey);
    cursor: pointer;
    transition: all 0.3s ease;
}
.classification li:hover {
    color: var(--lightGreen);
    text-shadow: 0 0 5px 1px grey;
    /* font-size: 1.2rem; */
}

.portfolio {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1em 1em;
}

.portfolio .item {
    position: relative;
}
.portfolio .picture {
    overflow: hidden;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px var(--lightGrey);
}
.portfolio img {
    display: block;
    width: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.3s ease-in-out;
}
.portfolio img:hover {
    transform: scale(1.2);
}
.portfolio .item:hover .description {
    height: 163px;
    z-index: 998;
}
.portfolio .item:hover h4:after {
    width: 100%;
    left: 0;
}

.portfolio .description {
    overflow: hidden;
    height: 0;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 95%;
    background-color: var(--bgGrey);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 0 10px var(--lightGrey);
    transition: var(--transition-all);
}

.portfolio .description h4 {
    position: relative;
    margin: 0.5em 0.8em;
}
.portfolio .description h4:after {
    content: "";
    position: absolute;
    bottom: -10%;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: black;
    transition: all 0.8s ease;
}

.portfolio .description div {
    text-align: left;
    padding: 0.3em 0.8em;
    font-size: 0.8em;
}

.classification {
    position: relative;
}

#myHabit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
#myHabit .service-group {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
}
#myHabit .col {
    display: block;
    flex-basis: 33%;
    padding: 0 1.1em 4.5em 1.1em;
}

#myHabit .content {
    transition: all 0.3s ease;
}
#myHabit .content:hover {
    transform: rotate(5deg);
}
#myHabit .content {
    border: 1px solid var(--lightGrey);
    border-radius: 5px;
    padding: 30px;
    text-transform: capitalize;
}
#myHabit .content-header img {
    width: 80px;
    height: 80px;
    border-radius: 100%;
    box-shadow: 0 0 10px var(--lightGrey);
}
.content > p {
    text-align: left;
}
#myResume {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#myResume .resume-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
#myResume .resume-img {
    width: 40%;
}
#myResume .resume-img img {
    width: 100%;
    height: 65vh;
    object-fit: cover;
}
#myResume .resume-Exp {
    width: 60%;
    padding-left: 80px;
}
#myResume .resume-Exp h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: normal;
}
#myResume .Exp-block {
    margin-bottom: 50px;
}

#myResume .workExp {
    display: flex;
    justify-content: space-between;
    padding: 20px 0 20px 0;
}
#myResume .workExp .detail h4 {
    margin-bottom: 20px;
    margin-top: 0;
    font-weight: normal;
}
#myResume .workExp .times .fulltime {
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 0.8em;
    letter-spacing: 0.2em;
    color: var(--workExp-colorGreen);
    background-color: var(--workExp-bgGreen);
    padding: 5px 15px;
    border-radius: 30px;
}
#myResume .workExp .times p {
    margin: 0 0 20px 0;
}
#myResume .workExp .detail span,
#myResume .workExp .times .calendar {
    margin: 0;
    font-size: 0.5em;
    color: var(--lightGrey);
}
#myResume .workExp .detail div {
    display: inline-block;
}
#myResume .workExp .detail span {
    padding-right: 10px;
}
#myResume .workExp img {
    width: 10px;
    height: 10px;
}
#myResume .workExp .times {
    text-align: right;
}

#myFriend {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
#myFriend .friend-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0 0 50px 0;
}
#myFriend .friend {
    flex-basis: 50%;
    display: flex;
    flex-direction: row;
    padding-bottom: 100px;
    /* padding:0 25px 100px 25px; */
}
#myFriend .friend .person-icon {
    flex-basis: 20%;
    display: block;
}
#myFriend .friend .person-msg {
    position: relative;
    flex-basis: 80%;
    padding: 20px 30px;
    margin: 0 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px var(--lightGrey);
}
#myFriend .friend .person-msg h4 {
    font-style: italic;
    font-weight: normal;
}
#myFriend .friend img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 5px solid white;
    background-color: rgb(201, 201, 201);
    box-shadow: 0 0 15px var(--lightGrey);
}
.person-msg div {
    position: absolute;
    top: 20px;
    left: -35px;
    width: 20px;
    height: 20px;
    border-width: 20px;
    border-color: transparent white transparent transparent;
    border-style: solid;
}
#myBlog {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.blog-group {
    width: 100%;
}

.blog {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 0 20px;
    padding-top: 20px;
    cursor: pointer;
    align-items: center;
}
.blog:hover h2 {
    transition: color 0.3s ease;
    color: var(--lightGreen);
}
.blog .times,
.blog .read {
    color: var(--lightGrey);
    letter-spacing: 0.2em;
    font-size: 0.8em;
    text-transform: uppercase;
}
.blog h2 {
    font-weight: normal;
    color: var(--darkBlack);
    padding: 0 0 20px 0;
    margin: 0;
}

#myFooter {
    display: block;
    background-color: var(--bgGrey);
    padding: 100px 50px;
}
#myFooter .row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem;
}
#myFooter .center {
    justify-content: center;
}
#myFooter .about-connect {
    /* flex-basis: 70%;
    padding-right: 50px; */
}
#myFooter .contact {
    /* flex-basis: 30%; */
}
#myFooter h4 {
    font-weight: normal;
    font-size: 1em;
}
#myFooter p,
#myFooter span {
    font-size: 0.8em;
    color: var(--lightGrey);
}
#myFooter .contact ul {
    padding: 0;
    margin: 0;
}
#myFooter .contact li {
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
}
#myFooter .contact li span {
    margin-left: 0.5rem;
}
#myFooter .connect ul {
    display: flex;
    flex-direction: row;
    padding: 0;
}

#myFooter .connect li {
    margin: 0 5px;
}
#myFooter .connect img,
#myFooter .contact img {
    width: 1.2em;
    height: 1.2em;
    opacity: 1;
    transition: all 0.3s ease;
}
#myFooter .connect img:hover,
#myFooter .contact img:hover {
    opacity: 0.5;
    transform: rotate(40deg);
}

.goBack-link img {
    display: none;
    position: fixed;
    bottom: 10%;
    right: 5%;
    width: 2em;
    height: auto;
    transform: rotate(90deg);
    animation-name: goBack-breath;
    animation-duration: 1s;
    animation-iteration-count: infinite;
}
.gs-reveal {
    will-change: transform, opacity;
}
@keyframes goBack-breath {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@media screen and (min-width: 992px) {
    .links-container {
        height: auto !important;
    }
}
@media screen and (max-width: 992px) {
    .logo,
    .toggle-button {
        position: static;
        /* transform: translateY(0%);
        top: 0; */
    }
    .links-container {
        height: 0;
        overflow: hidden;
        position: absolute;
        top: 140%;
        width: 100%;
        transition: var(--transition-all);
    }
    .links {
        display: block;
    }
    .links a {
        display: block;
        padding: 10px 20px;
        margin: 0;
        transition: var(--transition-all);
    }
    .links a:hover {
        background-color: var(--lightGrey);
        padding-left: 10px;
    }
    nav .toggle-button {
        display: block;
    }
    .main-container {
        width: var(--breakpoint-sm);
    }
    /* #myBio */
    #myBio .myBio-img,
    #myBio .myBio-intro {
        width: 100%;
        padding: 0;
        /* padding: 0 40px; */
    }
    #myBio .myBio-img img {
        height: 50vh;
    }
    /* #myPortfolio */
    .portfolio {
        grid-template-columns: 1fr 1fr;
    }
    /* #myportfolio .col {
        flex-basis: 50%;
    } */

    /* #myHabit */
    #myHabit .col {
        flex-basis: 50%;
    }

    /* #myResume */
    #myResume .resume-group {
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    #myResume .resume-img,
    #myResume .resume-Exp {
        width: 100%;
        padding: 0px;
    }
    #myResume .resume-img {
        padding-bottom: 30px;
    }
    /* #myFriend */
    #myFriend .friend {
        flex-basis: 100%;
    }
    /* #myFooter  */
    #myFooter .about-connect {
        flex-basis: 100%;
    }
    #myFooter .row {
        flex-direction: column;
        gap: 0;
    }
}

@media screen and (max-width: 768px) {
    .main-container {
        /* padding: 100px 15px; */
        width: 100%;
    }
    /* #myportfolio */
    .portfolio {
        grid-template-columns: 1fr;
    }
    /* #myHabit */
    #myHabit .col {
        flex-basis: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    /* #myBlog */
    .blog {
        /* flex-direction: column; */
        display: block;
        margin: 0;
    }
}
