* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #0a0a0a;
    color: #f5f5f5;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #1f1f1f;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.brand {
    font-size: 14px;
    letter-spacing: 0.35em;
    color: #d4d4d4;
}

.menu {
    display: flex;
    gap: 28px;
    color: #a3a3a3;
    font-size: 14px;
}

.menu a:hover {
    color: #ffffff;
}

.hero {
    padding: 80px 0 60px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-tag,
.section-tag {
    color: #737373;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.hero-title {
    margin: 18px 0 18px;
    font-size: clamp(48px, 8vw, 96px);
    line-height: 0.95;
}

.hero-subtitle {
    font-size: 22px;
    color: #d4d4d4;
    line-height: 1.6;
    max-width: 720px;
}

.hero-description,
.about-text,
.contact-text {
    font-size: 16px;
    line-height: 1.9;
    color: #a3a3a3;
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 999px;
    transition: 0.2s ease;
    font-size: 14px;
}

.btn-solid {
    background: #ffffff;
    color: #0a0a0a;
}

.btn-solid:hover {
    background: #e5e5e5;
}

.btn-outline {
    border: 1px solid #3f3f46;
    color: #ffffff;
}

.btn-outline:hover {
    border-color: #a1a1aa;
}

.hero-card,
.about-card,
.contact-box,
.project-card {
    background: #111111;
    border: 1px solid #262626;
    border-radius: 28px;
}

.hero-card {
    padding: 28px;
}

.hero-visual,
.about-card {
    min-height: 320px;
    border-radius: 22px;
    border: 1px solid #27272a;
    background: linear-gradient(135deg, #18181b, #09090b);
}

.about-card {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.hero-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
    gap: 16px;
}

.meta-label {
    color: #737373;
    font-size: 13px;
}

.meta-value {
    color: #ffffff;
    font-size: 18px;
    margin-top: 6px;
}

.meta-right {
    text-align: right;
}

.section {
    padding: 90px 0;
    border-top: 1px solid #18181b;
}

.section-dark {
    background: #0c0c0c;
}

.section-head {
    margin-bottom: 36px;
}

.section-head h2,
.about-content h2,
.contact-box h2 {
    margin: 14px 0 0;
    font-size: 42px;
}

.projects-list {
    display: grid;
    gap: 22px;
}

.project-card {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 24px;
    padding: 24px;
}

.project-cover {
    position: relative;
    min-height: 220px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #27272a;
    background: linear-gradient(135deg, #18181b, #09090b);
}

.project-cover-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0;
    height: 100%;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.project-cover-scroll::-webkit-scrollbar {
    display: none;
}

.media-item {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-item video {
    object-fit: contain;
    background: #000;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.carousel-prev,
.carousel-next {
    pointer-events: all;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev:disabled,
.carousel-next:disabled {
    opacity: 0.3;
    cursor: default;
}

.project-body h3 {
    margin: 0;
    font-size: 30px;
}

.project-meta {
    margin-top: 10px;
    color: #737373;
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.project-summary {
    margin-top: 16px;
    color: #a3a3a3;
    line-height: 1.8;
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tech-item {
    padding: 8px 14px;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    font-size: 13px;
    color: #d4d4d8;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 42px;
    align-items: start;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 34px;
}

.skills-grid h3 {
    color: #737373;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.skills-grid ul {
    margin: 18px 0 0;
    padding-left: 18px;
    color: #d4d4d4;
    line-height: 1.9;
}

.contact-box {
    padding: 42px;
}

.site-footer {
    border-top: 1px solid #18181b;
    padding: 28px 0 42px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.footer-title {
    color: #f5f5f5;
    margin-bottom: 10px;
}

.footer-text {
    color: #737373;
    line-height: 1.8;
}

@media (max-width: 900px) {
    .hero-grid,
    .about-grid,
    .project-card,
    .footer-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .menu {
        display: none;
    }

    .hero {
        padding-top: 56px;
    }

    .section-head h2,
    .about-content h2,
    .contact-box h2 {
        font-size: 34px;
    }

    .project-body h3 {
        font-size: 24px;
    }
}

.hero {
    position: relative;
    min-height: 760px;
    padding: 90px 0 140px;
    overflow: hidden;
    background: #000;
}

/* 右侧背景层：脱离普通布局 */
.hero-bg-right {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.hero-atmosphere {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
            radial-gradient(circle at 50% 88%, rgba(255, 35, 90, 0.34), transparent 24%),
            radial-gradient(circle at 50% 72%, rgba(255, 50, 100, 0.14), transparent 34%),
            linear-gradient(180deg, #02111a 0%, #031a2a 26%, #07111f 58%, #04060c 80%, #000 100%);
}

/* 文字内容层，压在背景上 */
.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-left {
    width: min(720px, 100%);
    padding-top: 30px;
}

.hero-tag,
.section-tag {
    color: #7d7d7d;
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.hero-title {
    margin: 18px 0 18px;
    font-size: clamp(52px, 8vw, 110px);
    line-height: 0.95;
}

.hero-subtitle {
    font-size: 22px;
    color: #d4d4d4;
    line-height: 1.6;
    max-width: 760px;
}

.hero-description {
    font-size: 16px;
    line-height: 1.9;
    color: #a3a3a3;
    max-width: 760px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 28px;
}

/* 星空 */
.hero-atmosphere-stars,
.hero-atmosphere-stars::before,
.hero-atmosphere-stars::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-repeat: repeat;
}

.hero-atmosphere-stars {
    background-image:
            radial-gradient(2px 2px at 24px 32px, rgba(255,255,255,0.85), transparent 60%),
            radial-gradient(1.4px 1.4px at 110px 84px, rgba(255,255,255,0.65), transparent 60%),
            radial-gradient(1.8px 1.8px at 210px 145px, rgba(255,255,255,0.75), transparent 60%),
            radial-gradient(1.2px 1.2px at 330px 60px, rgba(255,255,255,0.72), transparent 60%),
            radial-gradient(1.6px 1.6px at 438px 180px, rgba(255,255,255,0.7), transparent 60%),
            radial-gradient(1.1px 1.1px at 520px 95px, rgba(255,255,255,0.62), transparent 60%),
            radial-gradient(1.7px 1.7px at 620px 42px, rgba(255,255,255,0.78), transparent 60%);
    opacity: 0.55;
}

.hero-atmosphere-stars::before {
    background-image:
            radial-gradient(1.4px 1.4px at 58px 170px, rgba(255,255,255,0.52), transparent 60%),
            radial-gradient(1.1px 1.1px at 190px 220px, rgba(255,255,255,0.48), transparent 60%),
            radial-gradient(1.5px 1.5px at 320px 268px, rgba(255,255,255,0.58), transparent 60%),
            radial-gradient(1.2px 1.2px at 470px 220px, rgba(255,255,255,0.44), transparent 60%),
            radial-gradient(1.1px 1.1px at 610px 170px, rgba(255,255,255,0.52), transparent 60%);
    opacity: 0.38;
}

.hero-atmosphere-stars::after {
    background-image:
            radial-gradient(1.2px 1.2px at 96px 340px, rgba(255,255,255,0.44), transparent 60%),
            radial-gradient(1px 1px at 245px 388px, rgba(255,255,255,0.36), transparent 60%),
            radial-gradient(1.1px 1.1px at 418px 326px, rgba(255,255,255,0.42), transparent 60%),
            radial-gradient(1.3px 1.3px at 585px 406px, rgba(255,255,255,0.46), transparent 60%);
    opacity: 0.28;
}

/* 红色辉光 */
.hero-atmosphere-glow {
    position: absolute;
    left: 50%;
    top: 54%;
    width: 60%;
    height: 180px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 45, 95, 0.22) 0%, rgba(255, 45, 95, 0.08) 36%, transparent 76%);
    filter: blur(28px);
}

/* 红色斜线 */
.hero-atmosphere-line {
    position: absolute;
    left: 54%;
    top: 46%;
    width: 62%;
    height: 3px;
    transform: translate(-50%, -50%) rotate(-39deg);
    background: linear-gradient(
            90deg,
            rgba(255, 0, 76, 0) 0%,
            rgba(255, 40, 90, 0.20) 12%,
            rgba(255, 67, 110, 0.95) 48%,
            rgba(255, 120, 155, 1) 52%,
            rgba(255, 40, 90, 0.20) 88%,
            rgba(255, 0, 76, 0) 100%
    );
    box-shadow:
            0 0 10px rgba(255, 50, 100, 0.85),
            0 0 24px rgba(255, 50, 100, 0.55),
            0 0 42px rgba(255, 50, 100, 0.30);
}

.hero-atmosphere-line::before {
    content: "";
    position: absolute;
    inset: -9px 0;
    background: inherit;
    filter: blur(12px);
    opacity: 0.65;
}

.hero-atmosphere-line::after {
    content: "";
    position: absolute;
    inset: -22px 0;
    background: inherit;
    filter: blur(26px);
    opacity: 0.25;
}

/* 向下淡入黑色 */
.hero-atmosphere-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44%;
    background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.14) 20%,
            rgba(0, 0, 0, 0.38) 44%,
            rgba(0, 0, 0, 0.72) 70%,
            rgba(0, 0, 0, 1) 100%
    );
}

/* 手机端 */
@media (max-width: 900px) {
    .hero {
        min-height: auto;
        padding: 56px 0 90px;
    }

    .hero-bg-right {
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 360px;
        opacity: 0.92;
    }

    .hero-content {
        min-height: auto;
        display: block;
    }

    .hero-left {
        padding-top: 18px;
    }

    .hero-title {
        font-size: clamp(40px, 12vw, 72px);
    }

    .hero-atmosphere-line {
        width: 74%;
        left: 58%;
        top: 42%;
    }
}