* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Hannotate SC',sans-serif;
    color: #424242;
}

main {
    background: 
    linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)),
    url('../img/background.jpg');
    padding: 20px;
    min-height: 100vh;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

 /* General styles */
.base {
    width: 90%;
    margin: 0 auto;
    align-items: center;
    text-align: center;;
}

/* Main content styles */
section {
    margin: 20px auto;
    max-width: 1080px;
}

h2 {
    font-size: 26px;
    margin-bottom: 20px;
    background-image: url('../img/section.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px 0;
}

/* topic */
.topic-content {
    margin-top: 30px;
}

.topic-content-item-head {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.topic-category {
    width: 120px;
    font-size: 21px;
    color: #424242;
    padding: 6px 0;
    border-radius: 30px;
    border: 1px solid #424242;
    margin-right: 20px;
    text-align: center;
}

[data-type="tech"] {
    background-color: #D0D2F5;;
}
[data-type="life"] {
    background-color: #D0EAF5;
}
[data-type="portfolio"] {
    background-color: #D0F4E4;
}

.topic-title {
    font-size: 24px;
    color: #424242;
}

.topic-date {
    font-size: 18px;
    color: #424242;
    margin-left: 20px;
    margin-top: auto;
}


.topic-content-item {
    display: flex;
    text-align: left;
}

.topic-leftbox {
    flex: 1;
}

.topic-image {
    width: 95%;
    height: 300px;
}

.topic-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-rightbox {
    flex: 1;
}

.topic-description {
    font-size: 18px;
    color: #424242;
    margin-top: 10px;
    margin-bottom: 30px;
}

.topic-tag ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.topic-tag li {
    margin-right: 10px;
}

.topic-tag a {
    color: #62cffd;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 20px;
    transition: background-color 0.3s, color 0.3s;
}

.topic-tag a:hover {
    background-color: #62cffd;
    color: #fff;
}

.post-link {
    width: 100%;
    margin-top: 40px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.post-link a {
    display: block;
    margin: 0 auto;
    text-align: center;
    width: 140px;
    padding: 10px 20px;
    color: #424242;
    border: 1px solid #424242;
    border-radius: 5px;
    text-decoration: none;
    transition: 0.3s;
}

.post-link a:hover {
    background-color: #62cffd;
    color: #fff;


}

/* archives */
.archives-content {
    margin-top: 30px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.archives-item {
    align-items: center;
    margin-bottom: 20px;
}

.archives-item a {
    text-decoration: none;
    color: #424242;
}

.archives-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
}
.archives-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.archives-category-title {
    display: flex;
    align-items: center;
    margin: 10px 0;
}

.archives-category {
    font-size: 20px;
    color: #424242;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid #424242;
    margin-right: 10px;
}

.archives-description {
    font-size: 16px;
    color: #424242;
    margin-top: 10px;
    text-align: justify;
}

.archives-date {
    margin: 10px 30px 0 auto;
    color: #424242;
    margin-top: 5px;
    text-align: right;
}

.archives-tag ul {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    list-style: none;
}

.archives-tag li {
    margin-right: 5px;
}

.archives-tag ul li a {
    color: #62cffd;
    padding: 5px 8px;
    border-radius: 20px;
}

.archives-tag ul li a:hover {
    color: #fff;
    transition: 0.3s;
    background-color: #62cffd;
}

.archives-more {
    text-align: center;
    margin: 25px auto 40px;
}

.archives-more a {
    text-decoration: none;
    color: #424242;
    font-size: 20px;
    padding: 12px 22px;
    border: 1px solid #424242;
    border-radius: 10px;
}

.archives-more a:hover {
    background-color: #62cffd;
    color: #fff;
    transition: 0.3s;
    border: #62cffd 1px solid;
}

/* Profile styles */
.profile {
    position: relative;
    margin: 50px auto;
    max-width: 1000px;
    border: #424242 1px solid;
    border-radius: 40px;
}

.profile-title {
    position: absolute;
    top: -15px;
    left: 20%;
    transform: translateX(-50%);
    background-color: #fff;
    padding: 0 20px;
    border-radius: 20px;
    font-size: 24px;
    color: #424242;
}

.profile-content {
    margin: 20px;
    display: flex;
    padding: 20px;
    justify-content: space-between;
}

.profile-image {
    width: 35%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    margin-right: 30px;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-description {
    width: 55%;
    font-size: 18px;
    color: #424242;
    text-align: justify;
}

.profile-social {
    margin-top: 20px;
}

.profile-social ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.profile-social li {
    margin-right: 10px;
    margin-bottom: 10px;
}

.profile-social a {
    color: #424242;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 20px;
    border: 1px solid #424242;
    margin-right: 10px;
}

.profile-social a:hover {
    background-color: #62cffd;
    color: #fff;
    transition: 0.3s;
}

/* Footer Style */
.cat-wrap {
    position: relative;
    width: 100%;
    margin: 50px 0;
    height: 50px;
}

.footer-image {
    position: absolute;
    bottom: 1px;
    right: 200px;
    width: 60px;
    z-index: 1;
}

.footer-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #aaa;
    transform: translateY(-50%);
    z-index: 0;
}

footer {
    padding-bottom: 30px;
    height: 100px;
}

footer nav {
    max-width: 520px;
    margin:    10px auto 0;
}

footer nav ul {
    display: flex;
    justify-content: space-between;
    align-items: center;
    list-style: none;
    padding-top: 10px;
}

footer nav ul li {
    margin: 0 15px;
}
footer nav ul li.current a {
    color: #62cffd;
    font-weight: bold;
}
footer nav ul li a {
    color: #424242;
    text-decoration: none;
    padding: 10px 15px;
    font-size: 16px;
}
footer nav ul li a:hover {
    color: #62cffd;
    transition: 0.3s;
    font-weight: bold;
}

@media screen and (max-width: 428px) {
    /* topic */
    .topic-content-item-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .topic-category {
        margin-bottom: 10px;
        margin-right: 0;
    }

    .topic-date {
        margin: 10px 20px 0 auto;
    }

    .topic-content-item {
        flex-direction: column;
    }

    .topic-leftbox, .topic-rightbox {
        flex: none;
        width: 100%;
    }

    .topic-image {
        width: 100%;
        height: auto;
    }

    /* archives */
    .archives-content {
        grid-template-columns: 1fr;
    }
    
    /* profile */
    .profile-content {
        flex-direction: column;
        padding-bottom: 0;
        text-align: center;
    }
    
    .profile-image, .profile-description {
        width: 100%;
        margin: 0 0 20px 0;
    }

    .profile-title {
        left: 50%;
        transform: translateX(-50%);
        font-size: 20px;
        padding: 0 10px;
        width: 220px;
    }

    .footer-image {
        right: 100px;
    }


    footer nav ul li {
        margin: 0 1px;
    }

    footer nav ul li a {
        padding: 5px 8px;
        font-size: 16px;
    }
}