@font-face {
    font-family: "Outfit-Medium";
    src: url("./fonts/Outfit-Medium.ttf");
    font-weight: 500;
}

@font-face {
    font-family: "Outfit-SemiBold";
    src: url("./fonts/Outfit-SemiBold.ttf");
    font-weight: 600;
}

@font-face {
    font-family: "Outfit";
    src: url("./fonts/Outfit-Regular.ttf");
    font-weight: 400;
}

@font-face {
    font-family: "Outfit";
    src: url("./fonts/Outfit-Regular.ttf");
    font-weight: 500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
}

.author-info {
    font-size: 14px;
    text-align: center;
    margin-top: 16px;
    color: rgb(55, 65, 81);
}

.author-info a {
    text-decoration: none;
}

main {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #FFFEFE;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-radius: 16px;
    width: calc(280px * 4);
    height: calc(280px * 2);
    background-color: #F3F4F6;
    overflow: hidden;
    background-image: url("./resources/Background_decor.svg");
    background-repeat: no-repeat;
}

.topic-item {
    height: 280px;
    grid-column: span 2;
    box-sizing: border-box;
    padding-left: 32px;
    padding-top: 32px;
    padding-right: 32px;
}

.sub-topic {
    color: #263FA9;
    font-family: "Outfit";
    font-weight: 500;
    font-size: 1rem;
}

.topic {
    color: #000000;
    font-family: "Outfit-Medium";
    font-weight: 500;
    font-size: 2.5rem;
    margin-top: 16px;
}

.desc {
    color: #394150;
    font-family: "Outfit";
    font-weight: 400;
    font-size: 1rem;
    margin-top: 16px;
    margin-right: 16px;
}

.item {
    position: relative;
    width: 280px;
    height: 280px;
    overflow: hidden;
}

.item::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 2;
}

.item img {
    position: absolute;
    width: 280px;
    height: 280px;
    z-index: 1;
}

.item-info {
    position: absolute;
    bottom: 0;
    z-index: 3;
    margin-left: 24px;
    margin-right: 24px;
    margin-bottom: 24px;
}

.name {
    font-family: "Outfit-SemiBold";
    font-weight: 600;
    font-size: 1.25rem;
    color: #FFFEFE;
}

.work {
    font-family: "Outfit";
    font-weight: 400;
    font-size: 1rem;
    color: #FFFEFE;
}

.grid-container>div:nth-child(2) {
    background-color: #C1B6F8;
}

.grid-container>div:nth-child(3) {
    background-color: #EDACD2;
}

.grid-container>div:nth-child(5) {
    background-color: #9DC4F8;
}

.grid-container>div:nth-child(6) {
    background-color: #F8D8B0;
}

.grid-container>div:nth-child(7) {
    background-color: #86E7D4;
}

.see-all-item {
    position: relative;
    width: 280px;
    height: 280px;
}

.see-all {
    font-family: "Outfit-SemiBold";
    font-weight: 600;
    font-size: 1rem;
    color: #394150;
    position: absolute;
    bottom: 0;
    margin-left: 24px;
    margin-bottom: 24px;
}

.see-all::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("./resources/arrow\ up\ right.svg");
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

@media screen and (max-width: 1279px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
        width: calc(280px * 3);
        height: auto;
    }

    .topic-item {
        grid-column: span 3;
    }

    .desc {
        width: 60%;
    }

    .see-all-item {
        grid-row: 3;
        grid-column: 1;
    }
}

@media screen and (max-width: 1023px) {

    main {
        height: auto;
    }

    .grid-container {
        margin-top: 32px;
        border-radius: 32px;
        grid-template-columns: 1fr;
        width: 640px;
        height: auto;
        margin-right: 5%;
        margin-left: 5%;
    }

    .topic-item {
        grid-column: span 1;
    }

    .item {
        grid-column: span 1;
        width: 640px;
        height: 640px;
    }

    .item img {
        width: 640px;
        height: 640px;
    }

    .desc {
        width: 100%;
    }

    .see-all-item {
        width: 640px;
        height: 640px;
        grid-row: 8;
        grid-column: span 1;
    }

}