* {
    margin: 0;
    padding: 0;
}

:root {
    color-scheme: dark;
    --surface: rgba(18, 22, 29, 0.96);
    --terminal-surface: rgba(18, 22, 29, 0.86);
    --surface-muted: rgba(38, 43, 52, 0.94);
    --ink: #ece9e3;
    --ink-muted: #adb4be;
    --accent: #c77a56;
    --accent-strong: #e2a17b;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    position: relative;
    isolation: isolate;
    background-color: #0b0e13;
    color: var(--ink);
}

body::before {
    content: "";
    position: fixed;
    inset: -8px;
    z-index: -1;
    background-color: rgba(10, 14, 21, 0.5);
    background-image: url(../img/background.jpg);
    background-blend-mode: multiply;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: blur(3px);
    transform: scale(1.015);
}

#box {
    /* background-color: red; */
    width: 1200px;
    height: 100px;
    margin: 0 auto;
    padding-top: 5%;
}

.meBox {
    float: left;
    width: 20rem;
    height: 25rem;
    background-color: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    margin-top: 100px;
    border-radius: 2%;
    transition: all 0.3s;
    text-align: center;
}

.meBox:hover {
    width: 21rem;
    height: 26rem;
    margin: 95px 0 0 -5px;
    box-shadow: 0 5px 18px rgba(10, 18, 28, 0.22);
}

.headPhoto {
    width: 8rem;
    height: 8rem;
    background-color: #1d2441;
    background-image: url(../img/avatar.jpg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 50%;
    position: relative;
    top: -15%;
    left: 50%;
    margin-left: -4rem;
    transition: all 0.3s;
}

.meBox:hover .headPhoto {
    width: 9rem;
    height: 9rem;
    margin: -0.5rem 0 0 -4.5rem;
    transform: rotate(360deg);
}

.headPhoto:hover {
    box-shadow: 0 2px 8px rgba(10, 18, 28, 0.24);
}

.meBox-title {
    width: auto;
    margin: 0 auto;
}

@keyframes typing {
    from {
        width: 0;
    }
}

@keyframes blink-caret {
    50% {
        border-color: transparent;
    }
}

.meBox-title p {
    font-size: 1.2rem;
    border-right: .1em solid;
    width: 12ch;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 2s steps(20, end), blink-caret .3s step-end infinite alternate;
    margin: -30px 0 0 90px;
    transition: all 0.3s;
}

.meBox:hover .meBox-title p {
    font-size: 1.3rem;
}

.meBox-title .fg {
    width: 80%;
    height: 2px;
    background-color: var(--accent);
    margin: 5% 0 0 10%;
}

.meBox-text {
    width: 80%;
    height: 45%;
    overflow: hidden;
    text-align: center;
    color: var(--ink-muted);
    animation-name: meBox-text;
    animation-duration: 2s;
    animation-fill-mode: forwards;
    margin: 5% 0 0 10%;
    transition: all 0.3s;
}

.meBox-text p {
    margin-top: 5px;
}

.meBox:hover .meBox-text {
    font-size: 1.05rem;
}

@keyframes meBox-text {
    0% {
        transform: translateY(50px);
        color: white;
    }

    100% {
        transform: translateY(0);
        color: var(--ink-muted);
    }
}

.meBox-Button {
    width: 100%;
}

.meBox-Button a {
    display: inline-block;
    float: left;
    width: 158px;
    height: 50px;
    margin-top: 13px;
    line-height: 50px;
    text-decoration: none;
    color: var(--ink-muted);
    transition: all 0.3s;
}

.meBox-Button a:hover {
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.meBox:hover .meBox-Button a {
    width: 165px;
    margin-top: 10px;
}

#cmdBox {
    width: 710px;
    height: 550px;
    float: right;
    /* background-color: green; */
}

.cmd {
    width: 600px;
    height: 240px;
    border-radius: 10px 10px 5px 5px;
    overflow: hidden;
    background-color: var(--terminal-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
    backdrop-filter: blur(5px);
    transition: all 0.3s;
    font-size: 14px;
    color: var(--ink);
    position: relative;
    top: 0;
    left: 0;
}

.cmd,
.cmd * {
    font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}

.cmd .title span,
.cmdText > span,
.project-list a,
.project-more a {
    font-family: FiraCode, Consolas, monospace;
}

.cmd:hover {
    width: 610px;
    height: 250px;
    box-shadow: 0 5px 18px rgba(10, 18, 28, 0.22);
    margin: -5px 0 0 -5px;
    z-index: 1;
}

.cmd .title {
    width: 100%;
    height: 25px;
    background-color: var(--surface-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    line-height: 25px;
}

.cmd .title span {
    display: inline-block;
    width: 70%;
    text-align: center;
    /* background-color: red; */
}

.cmd .click {
    margin-left: 10px;
    float: left;
}

.cmd .click div {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 8px 0 0 10px;
    float: left;
}

.cmd .click .red {
    background-color: #ff1b22;
    box-shadow: 0 0 1px #ff1b22;
}

.cmd .click .red:hover {
    background-color: #ff6268;
    box-shadow: 0 0 3px #ff1b22;
}

.cmd .click .yellow {
    background-color: #ffaf00;
    box-shadow: 0 0 1px #ffaf00;
}

.cmd .click .yellow:hover {
    background-color: #ffd373;
    box-shadow: 0 0 3px #ffaf00;
}

.cmd .click .green {
    background-color: #00931a;
    box-shadow: 0 0 1px #00931a;
}

.cmd .click .green:hover {
    background-color: rgb(0, 196, 36);
    box-shadow: 0 0 3px #00931a;
}

.cmdText {
    padding-top: 10px;
    padding-left: 15px;
    padding-right: 15px;
    height: calc(100% - 35px);
    overflow-y: auto;
    box-sizing: border-box;
}

.cmdText p {
    line-height: 1.5;
}

.terminal-prompt {
    color: #2f6c50;
    font-weight: 600;
}

.terminal-path {
    color: #607086;
}

.terminal-command {
    color: var(--ink);
}

.project-list a,
.project-more a,
.site-links a {
    color: var(--accent-strong);
    text-decoration: none;
}

.project-list a:hover,
.project-more a:hover,
.site-links a:hover {
    text-decoration: underline;
}

.cmd2 {
    position: relative;
    top: -80px;
    left: 100px;
    height: 330px;
}

.cmd2:hover {
    height: 340px;
}

.project-list {
    list-style: none;
    margin: 6px 15px 8px 0;
}

.project-list li {
    line-height: 1.4;
    margin-bottom: 5px;
}

.project-list li::before {
    content: "-";
    color: var(--ink-muted);
    margin-right: 7px;
}

.project-list span {
    color: var(--ink-muted);
    margin-left: 8px;
}

.project-more,
.site-links {
    margin-top: 6px;
}

#footer {
    width: 100%;
    color: #f8f4ed;
    float: left;
    text-align: center;
    position: fixed;
    bottom: 0;
    z-index: 10;
    margin: 0;
    padding: 10px 0;
    background-color: rgba(11, 14, 19, 0.68);
    backdrop-filter: blur(8px);
    text-shadow: 0 1px 3px rgba(9, 14, 22, 0.8);
    /* background-color: blue; */
}

#footer a {
    text-decoration: none;
    color: #f8f4ed;
}

#footer a:hover {
    color: #f2b090;
}

.footer-separator {
    margin: 0;
    opacity: 0.72;
}

/* 自适应 */
@media screen and (max-width: 1250px) {
    #box {
        width: 100%;
    }

    .meBox {
        margin-left: 3%;
    }

    .meBox:hover {
        width: 21rem;
        height: 26rem;
        margin: 95px 0 0 2.5%;
    }

    #cmdBox {
        margin-right: 3%;
    }
}

@media screen and (max-width: 1120px) {
    #box {
        height: auto;
        min-height: 100%;
        padding-bottom: 60px;
        box-sizing: border-box;
    }

    .meBox {
        float: none;
        margin: 100px auto 100px;
    }

    .meBox:hover {
        width: 20rem;
        height: 25rem;
        margin: 105px auto 100px;
    }

    .meBox:hover .meBox-Button a {
        width: 158px;
        height: 50px;
        margin-top: 13px;
    }

    .meBox:hover .meBox-title p {
        font-size: 1.2rem;
    }

    .meBox:hover .headPhoto {
        width: 8rem;
        height: 8rem;
        margin: -0.5rem 0 0 -4rem;
        transform: rotate(360deg);
    }

    #cmdBox {
        float: none;
        margin: 0 auto 100px;
    }

    #footer {
        position: fixed;
        bottom: 0;
        clear: both;
        margin: 0;
        padding: 10px 0;
    }
}

@media screen and (max-width: 768px) {
    #box {
        min-height: 0;
    }

    .meBox {
        width: 300px;
        height: 320px;
        margin: 80px auto 48px;
    }

    .meBox:hover {
        width: 300px;
        height: 320px;
        margin: 80px auto 48px;
    }

    .meBox-Button a:hover {
        color: var(--accent-strong);
    }

    .meBox:hover .meBox-Button a {
        width: 50%;
        margin-top: 13px;
    }

    .meBox:hover .meBox-title p {
        font-size: 1.2rem;
    }

    .meBox:hover .headPhoto {
        width: 8rem;
        height: 8rem;
        margin: -0.5rem 0 0 -4rem;
        transform: rotate(360deg);
    }

    .meBox:hover .meBox-text {
        font-size: 1rem;
    }

    .meBox-text {
        height: auto;
        overflow: visible;
        margin-top: 24px;
    }

    .meBox-Button a {
        width: 50%;
    }

    #cmdBox {
        width: calc(100% - 40px);
        height: auto;
        margin: 0 auto 40px;
        padding: 0;
        overflow: visible;
        touch-action: pan-y;
    }

    .cmd {
        display: none;
        width: 100%;
        height: auto;
        margin: 0;
    }

    .cmd.mobile-active {
        display: block;
    }

    .cmd.mobile-active.enter-left {
        animation: terminal-enter-left 0.28s ease both;
    }

    .cmd.mobile-active.enter-right {
        animation: terminal-enter-right 0.28s ease both;
    }

    @keyframes terminal-enter-left {
        from {
            opacity: 0;
            transform: translateX(-14px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes terminal-enter-right {
        from {
            opacity: 0;
            transform: translateX(14px);
        }

        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    .cmdText {
        height: auto;
        overflow-y: visible;
        padding-bottom: 14px;
    }

    .cmd2 {
        position: relative;
        top: 0;
        left: 0;
        height: auto;
    }

    .cmd:hover {
        width: 100%;
        height: auto;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
        margin: 0;
        z-index: 1;
    }

    .cmd2:hover {
        height: auto;
    }

}

@media (prefers-reduced-motion: reduce) {
    .cmd.mobile-active.enter-left,
    .cmd.mobile-active.enter-right {
        animation: none;
    }
}
