/* Global */
:root {

    /* App Colors */
    --color-primary: var(--color-black);
    --color-primary-variant: var(--color-gray);
    --color-accent: var(--color-blue);
    --color-accent-variant: var(--color-orange);
    --color-text: var(--color-white);

    /* Colors */
    --color-white: #ffffff;
    --color-black: #050a13;
    --color-blue: #03e8f9;
    --color-orange: #fd6413;
    --color-gray: #1b1e26;
    --color-green: #65D0B0;
    --color-brightYello: #FFFAD0;

    /* Size */
    --size-max-width: 1200px;

    /* Divider */
    --divider-single-wave: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none" > <path d="M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z" > </path> </svg>');
    --divider-multi-wave:  url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"> <path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" class="shape-fill"></path> <path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" class="shape-fill"></path> <path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z"> </path> </svg>');
    --divider-arrow: url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"> <path d="M649.97 0L550.03 0 599.91 54.12 649.97 0z"></path> </svg>');
}

    /* Common */
.section {
    padding: 4rem;
    text-align: center;
}

.max-container {
    max-width: var(--size-max-width);
    margin: auto;
}

.title {
    font-size: 2.5rem;
    margin: 1rem 0;

}

.description {
    font-size: 1.5rem;
    margin: 0.5rem 0;
}


* {
    box-sizing: border-box
}

/* 화면을 부드럽게 올라가고 내려가게 하는 방법 */
html {
    scroll-behavior: smooth;
}


body {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
}

h1, h2, h3, p, ul {
    margin: 0;
}

ul {
    list-style: none;
    padding: 0;
}

a {
    text-decoration: none;
    color: var(--color-text);
}

button {
    background-color: transparent;
    outline: 0;
    border: 0;
}

button:focus {
    outline: 1px solid transparent;
}

/* Header */
.header {
    background-color: transparent;
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
    transition: all 300ms ease;
}

.header--dark {
    background-color: var(--color-primary);
    box-shadow: 0 20px 50px rgba(8, 112, 184, 0.7);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__logo__img {
    width: 36px;
    height: 36px;
}

.header__logo__title {
    font-size: 1.8rem;
}

.header__toggle {
    display: none;
    color: var(--color-white);
    font-size: 1.5rem;
    position: absolute;
    top: 1.3rem;
    right: 1rem;
}

.header__menu {
    display: flex;
    gap: 4px;
}

.header__menu__item {
    display: block;
    padding: 8px 16px;
    border-bottom: 1px transparent;
}

.header__menu__item:hover {
    border-bottom: 1px solid var(--color-accent);
}

.header__menu__item.active {
    border: 1px solid var(--color-accent);
    border-radius: 4px;
}

/* Home */
#home {
    position: relative;
    background-image: url('../images/HomeBack.png');
    background-size: cover;
    background-position: center bottom;
    color: var(--color-text);
    padding: 5rem 1rem;
    padding-top: 7rem;
    text-align: center;
}

#home::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(100% + 1.3px);
    height: 60px;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    background-color: var(--color-white);
    mask: var(--divider-single-wave);
    -webkit-mask: var(--divider-single-wave);
}

.home__divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

.home__avatar {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 100%;
    border: 3px solid var(--color-accent);
}

.home__title {
    font-size: 3rem;
    margin-bottom: 1rem;

}

.home__title--strong {
    color: var(--color-accent); 
}

.home__descrition {
    font-size: 1.3rem;
}

.home__contact {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-black);
    margin: 2rem;
    padding: 0.5rem 1rem;
    font-weight: bold;
    border-radius: 4px;
}

.home__contact:hover {
    background-color: transparent;
    color: var(--color-text);
    outline: 2px solid var(--color-accent);
}

/* About */
.resume__btn {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-black);
    padding: 0.8rem 2rem;
    font-weight: bold;
    border-radius: 4px;
    margin-top: 1rem;
    transition: backgroun-color 300ms ease-in-out, box-shadow 300ms ease-in-out;
    text-align: center;
    border: none;
    cursor: pointer;
}

.resume__btn:hover {
    background-color: var(--color-accent-variant);
    box-shadow: 0px 8px 15px rgba(253, 100, 19, 0.4);
}


.majors {
    display: flex;
    justify-content: space-evenly;
    gap: 0.1rem;
    margin: 2.5rem 1rem;
}

.major {
    background-color: var(--color-primary-variant);
    padding: 4rem 3rem;
    color: var(--color-text);
    border-radius: 1rem;
    cursor: default;
    box-shadow: 4px 8px 8px rgba(0, 0, 0, 0.38);
}

.major__icon{
    font-size: 4rem;
    margin: 1rem 0;
    color: var(--color-accent);
    transition: all 300ms ease;
}

.major__title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.major:hover .major__icon {
    transform: rotate(-15deg) scale(1.2);
}

.jobs {
    text-align: start;
}

.job {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 2rem;
    justify-content: flex-start;
    padding-left: 100px;
}

.job__name {
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.job__period {
    color: var(--color-primary);
    font-size: 1rem;
}

/* Education */
#education {
    background-color: #2c2f33;
    color: #ffffff;
    padding: 2rem 0;
    max-width: 100%;
    margin: 0 auto;
    text-align:start;
}

.education__title {
    font-size: 2.5rem;
    margin: 1rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.education__item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-left: auto;
    margin-right: auto;
    max-width: 40%;
    margin-bottom: 3rem;
    gap: 30px;
}

.education__images {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.education__image {
    width: 100px;
    height: auto;
    margin-right: 10px;
}

.education__info {
    flex-grow: 1;
}

.education__institution {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.education__detail {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.education__period {
    font-style: italic;
    margin-bottom: 1rem;
}





/* Skills */
#skills {
    position: relative;
    background-color: var(--color-primary-variant);
    color: var(--color-text);
}

.skills::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: calc(115% + 1.3px);
    height: 60px;
    overflow: hidden;
    line-height: 0;
    transform: rotate(180deg);
    background-color: var(--color-primary);
    mask: var(--divider-multi-wave);
    -webkit-mask: var(--divider-multi-wave);
}


/*Skills 게이지 0%부터 채워질 수 있도록 하는 코드*/
@keyframes fillBar {
    from { width: 0%;}
    to {width: inherit;}
}


.skills {
    display: grid;
    grid-template-columns: 6fr 4fr;
    margin: 2rem 3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2.8px 2.2px rgba(0, 0, 0, 0.034),
    0 6.7px 5.3px rgba(0, 0, 0, 0.048), 0 12.5px 10px rgba(0, 0, 0, 0.06),
    0 22.3px 17.9px rgba(0, 0, 0, 0.072), 0 41.8px 33.4px rgba(0, 0, 0, 0.086),
    0 100px 80px rgba(0, 0, 0, 0.12);
}

.skills__title {
    color: var(--color-accent);
    margin: 1rem 0;
    font-size: 1.2rem;
}


.skills__coding {
    grid-row: span 2;
    padding: 1rem;
    background-color: var(--color-primary);
}

.skills__tools {
    padding: 1rem;
}

.skills__etc {
    padding: 1rem;
    background-color: var(--color-primary);
        filter: brightness(150%);
}

.bar {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5 rem;
}

.bar_metdata {
    display: flex;
    justify-content: space-between;

}

.bar__bg {
    width: 100%;
    height: 3px;
    background-color: var(--color-primary-variant);

}

.bar__value {
    height: 3px;
    background-color: var(--color-accent);
    animation: fillBar 2s ease-out;
}

/* Work */
#work {
    background-color: var(--color-primary);
    color: var(--color-text);
}

.categories {
    display: flex;
    justify-content: center;
    margin: 2.5rem;
    gap: 1rem;

}

.category {
    position: relative;
    color: var(--color-text);
    font-size: 1.1rem;
    padding: 0.5rem 3rem;
    border-radius: 4px;
    border: 1px solid var(--color-accent);
    cursor: pointer;
    white-space: nowrap;
}

.category--selected {
    background-color: var(--color-accent);
    color: var(--color-primary);

}

.category__count {
    opacity: 0;
    position: absolute;
    top: -20px;
    right: 16px;
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 100%;
    background-color: var(--color-accent-variant);
    color: var(--color-text);
    transition: all 250ms ease-in;
}

.category--selected .category__count,
.category:hover .category__count {
    opacity: 1;
    top: 0;

}

.projects {    
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.1rem;
    transition: all 250ms ease-out;
}

.projects.anim-out {
    opacity: 0;
    transform: scale(0.96) translate(20px);
}

.project {
    position: relative;
     border-radius: 8px;
     overflow: hidden;
}

.project__image {
    width: 90%;
}

.project__metadata {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-black);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 250ms ease-in;
    transform: translateY(-10px);
}

.project__metadata:hover {
    opacity: 0.8;
    transform: translateY(0px);
}

.project__title::after {
    content: '';
    display: block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin: 0.5rem 0;
    width: 50px;
    height: 2px;
    background-color: var(--color-accent);
}

.project__metadata p {
    font-size: 12px;
}

/* Testimonial */

.testimonials {
    margin: 3rem;

}


.testimonial {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

/* Testimonial 의 글들을 지그재그로 정렬하는 방법 */
.testimonial:nth-child(even) .testimonial__img {
    order: 1;
}

.testimonial__img {
    width: 150px;
    height: 150px;
    border-radius: 100%;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}


.testimonial__bubble {
    padding: 1rem;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.testimonial__bubble__name{
    color: var(--color-accent);
    font-weight: bold;
    filter: brightness(70%);
}

/* Arrow Up */
.arrow-up {
    background-color: var(--color-primary);
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    font-size: 2.5rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 100%;
    text-align: center;
    box-shadow: 2.5px 2.5px 0px 0px var(--color-accent);
    transition: opacity 300ms ease-in;
}


/* Footer */
#contact {
    position: relative;
    background-color: var(--color-primary);
    color: var(--color-text);
}

#contact::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% + 1.3px);
    height: 60px;
    overflow: hidden;
    line-height: 0;
    background-color: var(--color-white);
    mask: var(--divider-arrow);
    -webkit-mask: var(--divider-arrow);
}

.contact__links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    font-size: 2rem;
}

.conatact__link {
    transition: color 250ms ease-in;
}

.conatact__link:hover {
    color: var(--color-accent);
}


@media screen and (max-width: 768px) {
    .section {
        padding: 4rem 2rem;
    }

    .title {
        font-size: 2rem;
    }

    .description {
        font-size: 1rem;
    }

    .header {
        flex-direction: column;
        align-items: start;
        background-color: var(--color-primary);
    }

    .header__toggle {
        display: block;
    }

    .header__menu {
        display: none;
        flex-direction: column;
        text-align: center;
        margin: 1rem 4rem;
        gap: 1rem;
    }

    .header__menu.open {
        display: flex;
    }

    .header__nav {
        width: 100%;
    }

    .resume__btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    #home {
        padding-bottom: 3rem;
    }
    
    .home_title {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .majors {
        flex-direction: column;
        align-items: center;
    }

    .major {
        max-width: 25rem;
    }

    .job {
        justify-content: center;
    }

    .skills{
        grid-template-columns: 1fr;
    }

    .categories {
        flex-direction: column;
    }

    .category {
        width: 100%;
    }

    .projects {
        grid-template-columns: repeat(2, 1fr);

    }

    .testimonial {
        flex-direction: column;
    }

    .testimonial:nth-child(even) .testimonial__img {
        order: 0;
    }

    .arrow-up {
        font-size: 2rem;
        width: 3rem;
        height: 3rem;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}