* {
    padding: 0;
    margin: 0;
    user-select: none;
    text-align: justify
}

body {
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.theme-loaded {
    opacity: 1;
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--f3-color);
    display: flex;
}




.backgrond-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-color);
    z-index: -9999;
}

.main::-webkit-scrollbar {
    display: none
}

.sidebar {
    background-color: var(--bg-color);
    /* padding: 40px 20px; */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: fixed;
    height: 100%;
    z-index: 10;
    justify-content: space-evenly;
    /* padding自适应 */
    padding: 0 calc(8% - 20px);
}

.sidebar>div {
    margin-left: 50px;
    max-width: 400px;
    /* 超出部分换行 */
    word-wrap: break-word;
}

.sidebar h1 {
    font-size: 48px;
    color: var(--f1-color);
    margin: 0;
}

.sidebar h2 {
    font-size: 18px;
    color: var(--f2-color);
    margin-top: 10px;
}

.sidebar p {
    font-size: 14px;
    color: var(--f2-color);
    margin-top: 20px;
}

.nav-links {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
}

.nav-links a {
    display: inline;
    margin: 10px 0;
    text-decoration: none;
    color: var(--nav-color);
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    transition: color 0.3s;
    font-weight: 600;
}

.nav-links .visited {
    color: var(--nav-hover);
}

.visited::before {
    content: "> ";
    color: var(--nav-hover);
    font-weight: 600;
    margin-right: 5px;
    font-size: 16px;
    transition: color 0.3s;
    display: inline;
    margin-left: 5px;
    font-family: 'Fira Code', monospace;
    font-weight: 600;
    font-size: 16px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--nav-hover);
}

.socials {
    margin-top: 40px;
}

.socials a {
    margin-right: 15px;
    display: inline-block;
}

.socials img {
    width: 24px;
    filter: saturate(50%);
    transition: transform 0.3s;
    object-fit: cover;
}

.socials img:hover {
    transform: scale(1.2);
    filter: saturate(100%);
}

#main_box {
    margin-left: 48%;
    height: calc(100vh - 60px);
    padding: 30px;
}

.main {
    padding: 0 40px;
    height: 100%;
    overflow-y: auto;
}

.main section {
    margin-bottom: 80px;
    transition: all 0.6s ease-out;
}

.main h2 {
    font-size: 32px;
    color: var(--f1-color);
}

.main h4 {
    font-size: 15px;
    color: var(--f2-color);
    margin-top: 10px;
}

.main p {
    font-size: 16px;
    margin-top: 15px;
    color: var(--f2-color);
    line-height: 1.8;
}

#about span {
    font-size: 16px;
    color: var(--about-span-color);
}

.project {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    background-color: var(--project-card);

}

.project:hover {
    box-shadow: 0 10px 30px var(--project-card-shadow);
    background-color: var(--project-card-hover);
}

.project:hover .project-img img {
    border: 2px solid var(--project-img-border-hover);
}

.project-img {
    position: relative;
    margin-top: 14px;
    display: inline-block;
}

.project-img-cover {
    width: 100%;
    height: calc(100% - 4px);
    position: absolute;
    top: 0;
    left: 0;
    background: var(--project-img-cover);
    z-index: 2;
    pointer-events: none;
    border-radius: 8px;
}

.project-img img {
    width: 250px;
    object-fit: cover;
    border: 2px solid var(--project-img-border);
    border-radius: 8px;
}


#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#experience h3 {
    margin-top: 50px;
}



.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--line-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: var(--line-color);
    border-radius: 50%;
    /* z-index: 10; */
}

.timeline-content {
    margin-left: 30px;
}

.timeline-content h3 {
    color: var(--f3-color);
    margin: 0 0 5px;
}

.timeline-content p {
    margin: 0;
    color: var(--f2-color);
}

.cursor,
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}

.cursor {
    width: 20vw;
    height: 20vw;
    background: var(--curosr-color);
    opacity: 0.3;
}

.cursor-follower {
    width: 50vw;
    height: 50vw;
    background: var(--curosr-shadow);
    border-radius: 50%;
    opacity: 0.1;
}


@media(max-width: 768px) {
    body {
        flex-direction: column;
    }

    .backgrond-cover {
        background: var(--bg-cover);
    }

    .sidebar {
        padding: 0;
        position: relative;
        margin: 0px 0;
        height: auto;
        background: transparent;
    }

    .socials img {
        width: 30px;
    }

    .nav-links {
        display: none;
    }

    #main_box {
        margin-left: 0;
        padding: 0px;
    }

    .main {
        padding: 0px;
        overflow: visible;
    }

    .sidebar h1 {
        font-size: 42px;
    }

    .sidebar h2 {
        font-size: 24px;
    }

    .sidebar p {
        font-size: 15px;
        font-weight: 600;
    }

    .nav-links a {
        font-size: 14px;
    }

    .main h2 {
        font-size: 28px;
        padding: 10px;
        position: sticky;
        top: 0;
        z-index: 10;
        transition: background-color 0.3s, box-shadow 0.3s;
    }

    .main h2.sticky-active {
        background: var(--sticky-title-backgroud);
        backdrop-filter: blur(1px);
        box-shadow: 0 2px 6px 2px var(--sticky-title-shadow);
        border-radius: 0 0 10px 10px;
    }

    #about_shell,
    #projects_shell {
        padding: 10px;
    }

    .shell_box {
        background-color: var(--mobile-card-backgroud);
        border-radius: 8px;
        padding: 10px;
    }

    .project {
        padding: 10px;
        background-color: var(--mobile-card-backgroud);
    }

    .project-img img {
        width: 100%;
    }

    .timeline {
        padding: 0 10px;
    }

    .timeline::before {
        left: 15px;
    }

    #particles {
        display: none;
    }

    .cursor {
        display: none;
    }

    .cursor-follower {
        display: none;
    }

    .main section {
        margin-bottom: 30px;
    }
}


/* 弹窗样式 */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 40vh;
    height: 40vh;
    display: none;
    /* 默认隐藏 */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* 左平移与上平移50% */
    transform: translate(-50%, -50%);
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease forwards;
}

.modal-content {
    position: relative;
    background: var(--modal-backgroud);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--modal-shadow);
    z-index: 10;
    max-width: 500px;
    width: 50%;
    transform: scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-content img {
    width: 100%;
    object-fit: cover;
}

.modal.show .modal-content {
    transform: scale(1);
    opacity: 1;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: var(--moda-close);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* 电脑端 */
@media (min-width: 768px) {
    .modal-content {
        width: 200px;
        padding: 40px;
    }
}

#get_resume {
    padding: 10px;
    color: var(--f3-color);
    font-weight: 600;
    padding-bottom: 30px;
    display: flex;
    align-items: center;
    margin-left: 10px;
}

.arrow-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-color: var(--f3-color);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75 0 010 1.08l-5.5 5.25a.75.75 0 11-1.04-1.08l4.158-3.96H3.75A.75.75 0 013 10z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23000' fill-rule='evenodd' d='M3 10a.75.75 0 01.75-.75h10.638L10.23 5.29a.75.75 0 111.04-1.08l5.5 5.25a.75.75 0 010 1.08l-5.5 5.25a.75.75 0 11-1.04-1.08l4.158-3.96H3.75A.75.75 0 013 10z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition: transform 0.3s ease;
    vertical-align: middle;
    margin-left: 10px;
}

/* 鼠标悬停时向右移动 */
.arrow-icon:hover,
.arrow-icon:focus-visible {
    transform: translateX(8px);
}

#get_resume:hover {
    cursor: pointer;
    text-underline-offset: 8px;
    text-decoration: underline var(--line-color);
}

#get_resume:hover .arrow-icon {
    transform: translateX(8px);
}


.project-tags {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    background-color: var(--project-tag-backgroud);
    color: var(--project-tag-color);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: background-color 0.3s ease;
}