@import url(https://fonts.bunny.net/css?family=abril-fatface:400|alegreya:400,400i,500,500i,600,600i,700,700i,800,800i,900,900i);

html {
    font-family: 'Alegreya', serif;
}

body {
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

body.light-mode {
    background-color: white;
    color: black;
}

body.dark-mode {
    background-color: rgb(1,22,39);
    color: #9baab6;
}

#toggle-mode {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.dark-mode #toggle-mode {
    background-color: rgb(1,22,39);
    box-shadow: 0px 4px 6px rgba(255, 255, 255, 0.2);
    transition: background-color 0.3s;
}

#toggle-mode::before {
    content: "☀️";
    font-size: 20px;
    transition: transform 0.3s, opacity 0.3s;
    transition: background-color 0.3s;
}

.dark-mode #toggle-mode::before {
    content: "🌙";
    transform: rotate(-20deg);
}

header {
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
    align-items: center;
}

a {
    color: rgb(218,89,91);
}

.yourName {
    font-family: 'Abril Fatface', Italic;
    font-style: italic;
    font-size: 24px;
}

.navlist {
    display: flex;
    justify-content: space-between;
}

.navitem {
    list-style-type: none;
    margin: 17px;
}

.navlink {
    padding: 0.25rem 0.5rem;
}

.intro {
    text-align: center;
    border: 1px solid;
}

.wrapper {
    display: flex;
    justify-content: space-between;
    border: 0.5px solid;
    box-sizing: border-box; /* 确保内边距和边框包含在宽度内 */
}

.projects {
    min-width: 200px;
    padding: 0px;
    border: 0.5px solid;
    flex-grow: 2;
    box-sizing: border-box; /* 确保内边距和边框包含在宽度内 */
}

.projects h2 {
    padding-left: 5px;
}

.projectList {
    list-style-type: none;
    padding: 0;
}

.projectItem {
    border-top: 0.5px solid;
    padding-left: 5px;
    box-sizing: border-box; /* 确保内边距和边框包含在宽度内 */
}

.workExperience {
    min-width: 300px;
    border: 0.5px solid;
    flex-grow: 2;
}

.workExperience h2 {
    padding-left: 5px;
}

.experienceItem {
    border-top: 0.5px solid;
    padding-left: 5px;
}

.education {
    min-width: 200px;
    padding-left: 5px;
    border: 0.5px solid;
    flex-grow: 2;
}

.education h2, p {
    padding-left: 5px;
}

.reviews {
    border-top: 1px solid;
}

.reviewsBlock {
    display: flex;
    justify-content: space-between;
}

.review {
    width: 290px;
    border: 1px solid;
    border-radius: 15px;
    margin: 5px 1px;
    padding: 0 0 0 5px;
    flex-grow: 2;
}

@media (max-width: 827px) {
    .wrapper {
        margin: 0;
        display: flex;
        flex-direction: column;
        width: 100%;

    }
    .projects, .workExperience, .education {
        margin: 0;
        padding: 0;
        width: 100%;
        box-sizing: border-box; /* 确保内边距和边框包含在宽度内 */
    }
    .reviewsBlock {
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    .review {
        width: 100%;
    }
}

@media (max-width: 600px) {
    header {
        display: flex;
        flex-direction: column;
    }
    .yourName {
        font-family: 'Abril Fatface', Italic;
        font-style: italic;
        font-size: 24px;
        text-align: center;
    }
}

@media (max-width: 476px) {
    .navlist {
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    .navitem {
        text-align: center;
    }
}

@media (max-width: 300px) {
    .projects, .workExperience, .education {
        min-width: 0;
    }
}