* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0b1020;
    --bg-soft: #11182d;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: #121a2f;
    --card: #ffffff;
    --card-soft: #f3f6fb;
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.22);
    --white: #ffffff;
    --accent: #6d7cff;
    --accent-2: #38bdf8;
    --accent-soft: rgba(109, 124, 255, 0.14);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.18);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.1);
    --radius: 8px;
    --nav-height: 84px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: #eef2f8;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: inherit;
}

.container {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.74);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    backdrop-filter: blur(18px);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
    border-bottom-color: rgba(148, 163, 184, 0.18);
}

.navbar .container {
    min-height: var(--nav-height);
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 24px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
    color: #111827;
    text-decoration: none;
}

.logo .highlight {
    color: var(--accent);
}

.nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links li a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    text-decoration: none;
    color: #334155;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.25s ease, background 0.25s ease;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: #0f172a;
    background: rgba(109, 124, 255, 0.08);
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    transform: scaleX(1);
}

.nickname {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(109, 124, 255, 0.16);
    border-radius: 999px;
    background: rgba(109, 124, 255, 0.08);
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

.nickname i {
    color: var(--accent);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.04);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 998;
}

.mobile-nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
}

.hero .container {
    position: relative;
    z-index: 2;
    padding-top: 120px;
    padding-bottom: 72px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(56, 189, 248, 0.2), transparent 28%),
        radial-gradient(circle at 82% 18%, rgba(109, 124, 255, 0.3), transparent 30%),
        radial-gradient(circle at 50% 100%, rgba(17, 24, 39, 0.2), transparent 28%),
        linear-gradient(135deg, #08101f 0%, #0c1630 52%, #121d3f 100%);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: auto -10% -22% auto;
    width: 48vw;
    min-width: 320px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(109, 124, 255, 0.24), transparent 68%);
    filter: blur(40px);
}

.particles-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.34;
}

.particles-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.75) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 92%);
    animation: particlesMove 18s linear infinite;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    letter-spacing: 0;
}

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7dd3fc, #818cf8);
    box-shadow: 0 0 16px rgba(125, 211, 252, 0.7);
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.06;
    letter-spacing: 0;
}

.hero p {
    max-width: 760px;
    margin-top: 22px;
    font-size: clamp(17px, 2.2vw, 20px);
    color: rgba(255, 255, 255, 0.76);
}

.hero-actions {
    display: flex;
    gap: 14px;
    margin-top: 34px;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-btn {
    color: #0f172a;
    background: linear-gradient(135deg, #ffffff, #dbeafe);
    box-shadow: 0 14px 34px rgba(56, 189, 248, 0.2);
}

.secondary-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-2px);
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 40px;
}

.feature {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
}

.feature i {
    color: #93c5fd;
    font-size: 16px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: min(720px, 100%);
    margin-top: 40px;
}

.hero-stat {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.hero-stat strong {
    display: block;
    margin-bottom: 8px;
    font-size: 28px;
    color: var(--white);
}

.hero-stat span {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.66);
}

.floating {
    animation: floating 2.8s ease-in-out infinite;
}

.tech-stack,
.services,
.about {
    padding: 110px 0;
}

.tech-stack {
    position: relative;
    background: linear-gradient(180deg, #0b1020 0%, #10192e 100%);
    color: var(--white);
}

.services {
    background: linear-gradient(180deg, #f7f9fc 0%, #edf2f9 100%);
}

.about {
    background: #ffffff;
}

.section-title {
    text-align: center;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: 0;
}

.section-desc {
    max-width: 680px;
    margin: 16px auto 0;
    text-align: center;
    color: #64748b;
    font-size: 16px;
}

.tech-grid,
.tech-cards,
.services-grid {
    margin-top: 52px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.tech-item {
    padding: 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.tech-item:hover {
    transform: translateY(-6px);
    border-color: rgba(109, 124, 255, 0.38);
    background: rgba(255, 255, 255, 0.07);
}

.tech-icon {
    font-size: 42px;
    color: #a5b4fc;
    margin-bottom: 18px;
}

.tech-item h3 {
    font-size: 20px;
    font-weight: 600;
}

.tech-bar {
    position: relative;
    height: 8px;
    margin-top: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.tech-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--percent);
    border-radius: inherit;
    background: linear-gradient(90deg, #7dd3fc, #818cf8);
}

.tech-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.tech-card {
    perspective: 1000px;
    height: 280px;
}

.tech-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.75s ease;
    cursor: pointer;
}

.tech-card:hover .tech-card-inner,
.tech-card.active .tech-card-inner {
    transform: rotateY(180deg);
}

.tech-card-front,
.tech-card-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 28px;
    border-radius: var(--radius);
    backface-visibility: hidden;
    box-shadow: var(--shadow-md);
}

.tech-card-front {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(231, 238, 255, 0.86));
    color: var(--text);
}

.tech-card-front i {
    margin-bottom: 18px;
    font-size: 40px;
    color: var(--accent);
}

.tech-card-front h3 {
    font-size: 22px;
    font-weight: 700;
}

.tech-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(160deg, #5c6cf6 0%, #1f6ea8 100%);
    color: var(--white);
}

.tech-card-back ul {
    list-style: none;
    text-align: center;
}

.tech-card-back li {
    margin: 12px 0;
    color: rgba(255, 255, 255, 0.84);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    position: relative;
    overflow: hidden;
    min-height: 320px;
    padding: 30px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
    border-color: rgba(109, 124, 255, 0.3);
}

.service-icon {
    width: 68px;
    height: 68px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(145deg, #eef2ff, #dbeafe);
    color: var(--accent);
    font-size: 26px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.service-content {
    margin-top: 26px;
}

.service-content h3 {
    font-size: 24px;
    line-height: 1.2;
}

.service-content p {
    margin-top: 14px;
    color: var(--text-soft);
}

.service-tag {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin-top: 18px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #4152df;
    font-size: 13px;
    font-weight: 600;
}

.service-hover {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 18px 18px 16px;
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(14, 20, 40, 0.96), rgba(31, 40, 74, 0.94));
    color: rgba(255, 255, 255, 0.88);
    transform: translateY(calc(100% + 24px));
    transition: transform 0.35s ease;
}

.service-hover ul {
    list-style: none;
}

.service-hover li + li {
    margin-top: 10px;
}

.service-card:hover .service-hover,
.service-card.active .service-hover {
    transform: translateY(0);
}

.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    gap: 36px;
    margin-top: 52px;
    align-items: start;
}

.about-text {
    padding: 36px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: var(--shadow-md);
}

.about-text p {
    font-size: 17px;
    color: var(--text-soft);
}

.about-features {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.about-feature {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1e293b;
}

.about-feature i {
    color: var(--accent);
}

.about-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
}

.about-panel-item {
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    background: #f8fbff;
}

.about-panel-item span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 14px;
}

.about-panel-item strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
}

.skills {
    padding: 36px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #11182d, #17213d);
    color: var(--white);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.18);
}

.skill-item + .skill-item {
    margin-top: 26px;
}

.skill-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.skill-label span {
    color: rgba(255, 255, 255, 0.78);
}

.skill-label strong {
    font-size: 14px;
    color: #dbeafe;
}

.progress-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7dd3fc, #818cf8);
}

.footer {
    padding: 28px 0;
    background: #0c1222;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: 14px;
}

.animate-text {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.animate-text:nth-child(2) {
    animation-delay: 0.15s;
}

.animate-text:nth-child(3) {
    animation-delay: 0.3s;
}

.animate-text:nth-child(4) {
    animation-delay: 0.45s;
}

.animate-text:nth-child(5) {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes particlesMove {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-48px);
    }
}

@keyframes floating {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@media (max-width: 1024px) {
    .navbar .container {
        grid-template-columns: auto 1fr auto;
    }

    .nickname {
        display: none;
    }

    .tech-grid,
    .tech-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100% - 28px, 1180px);
    }

    .logo {
        font-size: 20px;
    }

    .navbar .container {
        min-height: 74px;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        position: fixed;
        top: 74px;
        left: 14px;
        right: 14px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        padding: 14px;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        border: 1px solid rgba(148, 163, 184, 0.18);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 24px 40px rgba(15, 23, 42, 0.12);
        transform: translateY(-14px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .nav-links.active {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links li a {
        width: 100%;
        justify-content: flex-start;
        min-height: 46px;
        padding: 0 14px;
        border-radius: 10px;
    }

    .nav-links li a::after {
        display: none;
    }

    .nav-links li a.active {
        background: rgba(109, 124, 255, 0.12);
        color: #2333c7;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero .container {
        padding-top: 108px;
        padding-bottom: 72px;
    }

    .hero-eyebrow {
        display: inline-flex;
        max-width: 100%;
        font-size: 12px;
        padding: 9px 14px;
    }

    .hero h1 {
        font-size: clamp(34px, 10vw, 48px);
        max-width: 100%;
    }

    .hero p {
        font-size: 16px;
        margin-top: 18px;
        max-width: 100%;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 28px;
    }

    .primary-btn,
    .secondary-btn {
        width: 100%;
    }

    .hero-features {
        gap: 12px;
        margin-top: 28px;
    }

    .feature {
        width: 100%;
        justify-content: center;
        min-height: 48px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 28px;
    }

    .hero-stat {
        padding: 18px;
    }

    .tech-stack,
    .services,
    .about {
        padding: 84px 0;
    }

    .tech-grid,
    .tech-cards,
    .services-grid,
    .about-panel {
        grid-template-columns: 1fr;
    }

    .tech-card {
        height: 240px;
    }

    .service-card {
        min-height: 332px;
        padding: 24px;
        padding-bottom: 112px;
    }

    .service-hover {
        left: 14px;
        right: 14px;
        bottom: 14px;
        padding: 16px 16px 14px;
    }

    .about-text,
    .skills {
        padding: 26px 22px;
    }

    .about-text p {
        font-size: 16px;
    }

    .about-features {
        gap: 10px;
    }

    .about-feature {
        width: 100%;
        justify-content: flex-start;
    }

    .about-panel-item {
        padding: 18px;
    }

    .skill-label {
        margin-bottom: 10px;
    }

    .tech-card::after,
    .service-card::after {
        content: "点击查看详情";
        position: absolute;
        left: 50%;
        bottom: 16px;
        transform: translateX(-50%);
        min-height: 28px;
        padding: 0 12px;
        border-radius: 999px;
        background: rgba(15, 23, 42, 0.8);
        color: rgba(255, 255, 255, 0.78);
        font-size: 12px;
        line-height: 28px;
        letter-spacing: 0;
    }
}
