:root {
    --bg: #070b1d;
    --card: rgba(18, 25, 52, .68);
    --text: #f7f7ff;
    --muted: #a8b0ca;
    --pink: #ff68b5;
    --purple: #9b7cff;
    --blue: #57a9ff;
    --line: rgba(255, 255, 255, .09);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth
}

body {
    font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 75% 15%, rgba(120, 76, 255, .18), transparent 28%),
    radial-gradient(circle at 20% 80%, rgba(255, 71, 170, .10), transparent 25%), var(--bg);
    overflow-x: hidden;
}


@keyframes stars {
    to {
        background-position: 95px 190px
    }
}

a {
    color: inherit;
    text-decoration: none
}

.nav {
    position: fixed;
    z-index: 20;
    left: 22px;
    top: 22px;
    bottom: 22px;
    width: 220px;
    padding: 24px 16px;
    border: 1px solid var(--line);
    border-radius: 22px;

    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 80px rgba(0, 0, 0, .35)
}

.avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 4px auto 12px;
    object-fit: cover;
    border: 2px solid #ff80c3;
    box-shadow: 0 0 25px rgba(255, 100, 190, .45)
}

body {
    position: relative;

    font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;

    color: var(--text);

    background: radial-gradient(
            circle at 75% 15%,
            rgba(120, 76, 255, .14),
            transparent 28%
    ),
    radial-gradient(
            circle at 20% 80%,
            rgba(255, 71, 170, .08),
            transparent 25%
    ),
    var(--bg);

    overflow-x: hidden;
}


/* 整站背景图片 */
body::before {
    content: "";

    position: fixed;

    inset: 0;

    background: url("/static/background.png") center center / cover no-repeat;

    opacity: .25;

    mix-blend-mode: screen;

    pointer-events: none;

    z-index: 0;
}


/* 网站内容 */
main {
    position: relative;
    z-index: 1;
}


/* Hero */
.hero {
    min-height: 760px;

    display: flex;
    align-items: center;

    position: relative;

    overflow: hidden;

    padding: 80px 7% 70px;

    background: transparent;
}


/* Hero 遮罩 */

.logo {
    text-align: center;
    font-weight: 800;
    letter-spacing: 1px
}

.role {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    margin-top: 8px
}

.links {
    margin-top: 34px;
    display: grid;
    gap: 8px
}

.links a {
    padding: 14px 16px;
    border-radius: 12px;
    color: #bac1d9;
    transition: .25s
}

.links a:hover, .links a.active {
    background: linear-gradient(90deg, rgba(255, 104, 181, .16), rgba(100, 130, 255, .13));
    color: #fff;
    transform: translateX(4px)
}

.mode {
    margin-top: auto;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    text-align: center;
    color: #c9cee0;
    cursor: pointer
}

main {
    margin-left: 265px
}


body {
    position: relative;
}

body::after {
    content: "";

    position: fixed;

    inset: 0;

    pointer-events: none;

    background-image: radial-gradient(
            rgba(255, 255, 255, .7) 1px,
            transparent 1px
    );

    background-size: 95px 95px;

    opacity: .08;

    animation: stars 20s linear infinite;

    z-index: 0;
}


.hero-content {
    max-width: 720px;
    animation: rise 1s ease both
}

.eyebrow {
    font-size: 22px;
    color: #d9dcef;
    margin-bottom: 8px
}

h1 {
    font-size: clamp(60px, 8vw, 108px);
    line-height: .95;
    letter-spacing: -5px;
    background: linear-gradient(100deg, #ff72bd, #a978ff, #5eb5ff);
    -webkit-background-clip: text;
    color: transparent
}

.hero h2 {
    font-size: 28px;
    margin: 22px 0 16px
}

.gradient {
    background: linear-gradient(90deg, var(--blue), var(--pink));
    -webkit-background-clip: text;
    color: transparent
}

.hero p {
    max-width: 600px;
    color: var(--muted);
    line-height: 1.9
}

.actions {
    display: flex;
    gap: 14px;
    margin-top: 30px
}

.btn {
    padding: 14px 24px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .2);
    transition: .25s
}

.btn.primary {
    border: 0;
    background: linear-gradient(100deg, #ff65b3, #5e9cff);
    box-shadow: 0 12px 35px rgba(128, 102, 255, .3)
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(100, 120, 255, .2)
}

.scroll {
    position: absolute;
    bottom: 25px;
    left: 50%;
    color: #8d95b0;
    font-size: 12px;
    animation: bounce 1.8s infinite
}

@keyframes bounce {
    50% {
        transform: translateY(8px)
    }
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(35px)
    }
    to {
        opacity: 1;
        transform: none
    }
}

section {
    padding: 55px 7%;
    max-width: 1500px;
    margin: auto
}

.section-title {
    font-size: 30px;
    margin-bottom: 26px
}

.section-title span {
    color: var(--pink)
}

.grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 20px
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 28px;
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .16);
    transition: .3s
}

.card:hover {
    transform: translateY(-7px);
    border-color: rgba(255, 120, 200, .25)
}

.about p {
    color: var(--muted);
    line-height: 1.9
}

.info {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 12px;
    margin-top: 20px
}

.info div {
    background: rgba(255, 255, 255, .035);
    padding: 15px;
    border-radius: 12px;
    color: #c7cce0;
    font-size: 14px
}

.info b {
    display: block;
    color: #fff;
    margin-top: 6px
}

.skill {
    margin: 20px 0
}

.skill-head {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px
}

.bar {
    height: 7px;
    background: #202741;
    border-radius: 10px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    width: var(--w);
    border-radius: inherit;
    background: linear-gradient(90deg, #6f8cff, #ff73b9);
    animation: load 1.4s ease both
}

@keyframes load {
    from {
        width: 0
    }
}

.projects {
    display: grid;
    grid-template-columns:repeat(4, 1fr);
    gap: 18px
}

.project {
    overflow: hidden;
    padding: 0
}

.project-img {
    height: 175px;
    background: linear-gradient(135deg, #1d315d, #9b6bdb);
    display: grid;
    place-items: center;
    font-size: 42px;
    position: relative
}

.project-img:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, .12));
    transform: translateX(-100%);
    transition: .6s
}

.project:hover .project-img:after {
    transform: translateX(100%)
}

.project-body {
    padding: 20px
}

.project-body p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
    margin: 8px 0 14px
}

.tags span {
    display: inline-block;
    padding: 5px 9px;
    background: rgba(147, 122, 255, .12);
    border-radius: 7px;
    font-size: 11px;
    color: #bdb5f6;
    margin: 2px
}

.contact {
    text-align: center
}

.contact p {
    color: var(--muted);
    margin: 12px auto 24px
}

.footer {
    text-align: center;
    padding: 40px;
    color: #68718f;
    border-top: 1px solid var(--line);
    margin-top: 30px
}

.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: .8s
}

.reveal.show {
    opacity: 1;
    transform: none
}

@media (max-width: 1000px) {
    .nav {
        width: 72px;
        padding: 12px 8px
    }

    .nav .logo, .nav .role, .links span, .mode span {
        display: none
    }

    .avatar {
        width: 48px;
        height: 48px
    }

    .links a {
        text-align: center;
        font-size: 0
    }

    .links a:first-letter {
        font-size: 20px
    }

    main {
        margin-left: 100px
    }

    .projects {
        grid-template-columns:1fr 1fr
    }
}

@media (max-width: 700px) {
    .nav {
        display: none
    }

    main {
        margin-left: 0
    }

    .hero {
        min-height: 680px;
        padding: 60px 24px
    }

    .hero h1 {
        font-size: 64px
    }

    .hero h2 {
        font-size: 22px
    }

    section {
        padding: 45px 24px
    }

    .grid, .projects {
        grid-template-columns:1fr
    }

    .info {
        grid-template-columns:1fr
    }
}

.server-status {
    display: flex;
    align-items: center;
    gap: 7px;

    font-size: 13px;
    color: #666;

    white-space: nowrap;
}


.status-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #999;

    transition: 0.3s;
}


.status-dot.online {
    background: #22c55e;

    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}


.status-dot.offline {
    background: #ef4444;

    box-shadow: 0 0 8px rgba(239, 68, 68, 0.7);
}
/* =========================
   服务器状态
========================= */

.server-status {
    position: relative;

    left: 20px;
    top: 30px;
}

.server-status-header {
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}


.status-dot {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #999;
}

.status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 7px rgba(34, 197, 94, .7);
}

.status-dot.offline {
    background: #ef4444;
    box-shadow: 0 0 7px rgba(239, 68, 68, .7);
}


/* =========================
   状态面板
========================= */

.server-status-panel {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    width: 230px;

    padding: 12px 14px;

    border-radius: 12px;

    background: rgba(255, 255, 255, .95);

    border: 1px solid rgba(0, 0, 0, .08);

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .15);

    backdrop-filter: blur(12px);

    opacity: 0;
    visibility: hidden;

    transform: translateY(-5px);

    transition: all .18s ease;

    z-index: 9999;
}


/* 鼠标悬停 */

.server-status:hover
.server-status-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* =========================
   标题
========================= */

.server-title {
    font-size: 13px;
    font-weight: 600;

    padding-bottom: 8px;
    margin-bottom: 5px;

    border-bottom: 1px solid rgba(0, 0, 0, .08);
}


/* =========================
   数据项目
========================= */

.server-item {
    display: flex;

    align-items: center;

    justify-content: space-between;

    min-height: 30px;

    border-bottom:
        1px solid rgba(0, 0, 0, .04);
}

.server-item:last-child {
    border-bottom: none;
}


.server-item-title {
    color: #888;

    font-size: 11px;
}


.server-item-value {
    color: #333;

    font-size: 11px;

    text-align: right;

    line-height: 1.4;
}


.server-item-value small {
    color: #999;
    font-size: 10px;
}