h2 {
    font-size: 2.7em;
    width: 100%;
}

/* top */
section#top {
    transition: height 0.7s ease-out;
    position: relative;
    padding: 0;
    height: 100%;
    opacity: 0;
    animation: fade_in 2s 0.3s forwards;
}
@keyframes fade_in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

section#top.scrolled {
    min-height: 7em;
    height: 50%;
}

section#top > h1 {
    display: flex;
    flex-direction: column;
    font-size: 4.9vmin;
    width: max-content;
    margin-right: calc((25vw - 25vmin));
    transform: translateY(-25%);
}

section#top > h1 >  span {
    white-space: nowrap;
    line-height: 1.2em;
}

section#top > h1  > span:last-child {
    font-size: 0.4em;
    opacity: 0.9;
}

section#top > div {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 30%;
    display: flex;
    justify-content: center;
}

section#top > div > img {
    transition: opacity 0.7s;
    position: absolute;
    width: 0.8vmin;
    min-width: 2.5em;
    opacity: 0.65;
    bottom: 4.5vmin;
    animation: scroll 1.2s 2s infinite alternate ease-in-out;
    pointer-events: none;
}
section#top > div > img.hide {
    opacity: 0;
}

@keyframes scroll {
    0% {
        bottom: 4.5vmin;
    }

    45% {
        bottom: 4.5vmin;
    }

    100% {
        bottom: 3.5vmin;
    }
}

/* profile */
section#profile > div {
    display: flex;
}
section#profile > div > img {
    background-color: white;
    width: 200px;
    height: 200px;
    border: solid 2px rgba(128, 128, 128, 0.2);
}
section#profile > div > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 4vmin;
}
section#profile > div > div > p {
    margin: 0;
    letter-spacing: 0.12em;
    line-height: 1.6em;
}
section#profile > div > div > p:first-child {
    line-height: 1.1em;
    font-size: 1.6em;
    margin-bottom: 5px;
}
section#profile > div > div > div {
    margin-top: 13px;
}
section#profile > div > div > div > a {
    display: inline-block;
    opacity: 0.4;
}
section#profile > div > div > div > a:hover {
    opacity: 0.7;
}

/* skills */
section#skills {
    height: max-content;
}

section#skills > div {
    width: 95%;
    background-color: white;
}

div#skill_tags {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    min-height: 20px;
    height: max-content;
    padding: 0 3%;
    padding-top: 2%;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
div#skill_tags > input {
    display: none;
}
div#skill_tags > input + label {
    margin: 3px 2px;
    padding: 0 10px;
    border: solid 1px gray;
    border-radius: 6px;
    font-size: 0.7em;
    cursor: pointer;
    opacity: 0.6;
}
div#skill_tags > input:checked + label {
    border: solid 1px rgba(128, 128, 128, 0);
    background-color: #2f61eb;
    color: white;
    cursor: default;
}

div#skill_list_box {
    display: flex;
    width: 100%;
    min-height: 160px;
    height: max-content;
}

div#skill_list {
    position: relative;
    flex: auto;
    display: flex;
    align-items: center;
    overflow-x: scroll;

    scrollbar-width: thin;
    scrollbar-color: rgb(246, 246, 246) rgba(128, 128, 128, 0);
}

div#skill_list > div {
    height: max-content;
    margin: 15px;
    transform: scale(0.7);
    transition: transform 0.2s;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
div#skill_list > div:hover {
    transform: scale(0.9);
}
div#skill_list > div > img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    pointer-events: none;
}
div#skill_list > div > p {
    text-align: center;
    margin: 5px 0;
    font-size: 1.2em;
}

div.skill_switch {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 35px;
    cursor: pointer;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

div.skill_switch > img {
    position: absolute;
    height: 15px;
    pointer-events: none;
    transition: transform 0.2s;
    opacity: 0.7;
}
div.skill_switch > img.left {
    transform: rotateZ(90deg);
}
div.skill_switch:hover > img.left {
    transform: translateX(-4px) rotateZ(90deg);
}
div.skill_switch > img.right {
    transform: rotateZ(-90deg);
}
div.skill_switch:hover > img.right {
    transform: translateX(4px) rotateZ(-90deg);
}

section#skills > div > hr {
    border: none;
    border-bottom: solid 1px rgba(128, 128, 128, 0.1);
}

div#skill_info {
    width: 100%;
    min-height: 95px;
    height: fit-content;
    padding: 10px 5%;
    box-sizing: border-box;
}
div#skill_info > span {
    display: block;
    font-size: 0.8em;
    letter-spacing: 0.17em;
    color: var(--sub-text-color);
}

/* timeline */
section#timeline {
    height: max-content;
}

#timeline_box {
    box-sizing: border-box;
    width: 95%;
    border-left: solid 2.5px gray;
    margin-left: 5%;
}

#timeline_box > div  {
    position: relative;
    display: flex;
    align-items: center;
    margin: 20px 0;
}

#timeline_box > div:before {
    position: absolute;
    content: "";
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: #5269DB;
    border: solid 0.5px white;
    transform: translateX(calc(-50%  - 1.25px));
}

#timeline_box > div.stage:before {
    width: 8px;
    height: 8px;
    background-color: gray;
}

#timeline_box > div.stage {
    color: var(--sub-text-color);
    margin: 10px 0;
}

#timeline_box > div.event {
    transition: 0.2s background-color, 0.2s box-shadow;
    cursor: pointer;
}
#timeline_box > div.event:hover {
    background-color: white;
    box-shadow: 3px 2px 2.7px rgba(128, 128, 128, 0.2);
}

#timeline_box > div.event > div {
    width: 100%;
}

#timeline_box > div > div {
    margin-left: 4%;
    font-size: 1.6em;
}

#timeline_box > div > div > span {
    display: block;
    font-size: 0.55em;
    line-height: 0.9em;
    color: var(--sub-text-color);
}

#timeline_box > div.stage > div {
    font-size: 1.1em;
}

@media (max-width: 1500px) {
    section#top > h1 {
        font-size: 4.5vw;
        margin-right: calc((20vw - 20vmin));
        transform: translateY(-15%);
    }
}

@media (max-width: 800px) {
    h2 {
        font-size: 2em;
    }
    section#top {
        opacity: 1;
        animation: none;
    }
    section#top > h1 {
        font-size: 9vmin;
        padding-bottom: 16%;
    }
    section#top.scrolled {
        min-height: 17em;
    }

    section#profile > div {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    section#profile > div > div {
        margin-top: 4vmin;
        margin-left: 0vmin;
    }
    section#profile > div > div > div {
        display: flex;
        justify-content: space-around;
    }
    section#profile > div > div > div > a {
        padding: 5px;
    }

    div#skill_tags > * {
        display: none;
    }

    #skill_list {
        position: relative;
    }
}

@media (max-height: 500px) {
    section#top > h1 {
        font-size: 8vw;
        padding-bottom: 0%;
        margin: auto;
    }
    section#top.scrolled {
        height: 100%;
    }
}

@media (min-width: 800px) and (max-height: 500px) {
    section#top > h1 {
        font-size: 4vw;
    }
}


@media (min-width: 1920px) {
    section#top > h1 {
        display: flex;
        flex-direction: column;
        font-size: 4em;
        width: max-content;
        margin-right: 5%;
    }
}