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

@font-face {
    font-family: 'OPPO Sans 4.0';
    src: url('../fonts/OPPO Sans 4.0.ttf') format('truetype');
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --kraken-purple: #7132f5;
    --purple-dark: #5741d8;
    --purple-deep: #5b1ecf;
    --purple-subtle: rgba(133, 91, 251, 0.2);
    --purple-glow: rgba(113, 50, 245, 0.5);
    --dark-bg: #0a0a0f;
    --dark-surface: #12121a;
    --dark-elevated: #1a1a25;
    --near-white: #f0f0f5;
    --cool-gray: #8b8da3;
    --silver-blue: #6b6d80;
    --border-dark: #2a2a3a;
    --green: #1e5c8a;
    --green-dark: #144a6b;
    --bilibili-pink: #fb7299;
    --shadow-subtle: rgba(113, 50, 245, 0.15) 0px 4px 24px;
    --shadow-glow: 0 0 40px rgba(113, 50, 245, 0.3), 0 0 80px rgba(113, 50, 245, 0.1);
    --shadow-micro: rgba(0, 0, 0, 0.3) 0px 1px 4px;
}

body {
    font-family: 'OPPO Sans 4.0', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--near-white);
    line-height: 1.38;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
.display-hero {
    font-family: 'OPPO Sans 4.0', Helvetica, Arial, sans-serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.17;
    letter-spacing: -1px;
    color: var(--near-white);
}

.section-heading {
    font-family: 'OPPO Sans 4.0', Helvetica, Arial, sans-serif;
    font-size: 36px;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.5px;
    color: var(--near-white);
}

.sub-heading {
    font-family: 'OPPO Sans 4.0', Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.29;
    letter-spacing: -0.5px;
    color: var(--near-white);
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.20;
    color: var(--near-white);
}

.body-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.38;
    color: var(--cool-gray);
}

.body-medium {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.38;
    color: var(--near-white);
}

.caption {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.43;
    color: var(--silver-blue);
}

.small-text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.33;
    color: var(--cool-gray);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.38;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--kraken-purple);
    color: #fff;
    padding: 13px 16px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(113, 50, 245, 0.3);
}

.btn-primary:hover {
    background-color: var(--purple-dark);
    box-shadow: 0 0 30px rgba(113, 50, 245, 0.5);
}

.btn-outlined {
    background-color: transparent;
    color: var(--kraken-purple);
    border: 1px solid var(--kraken-purple);
    padding: 13px 16px;
    border-radius: 12px;
}

.btn-outlined:hover {
    background-color: var(--purple-subtle);
    box-shadow: 0 0 20px rgba(113, 50, 245, 0.2);
}

.btn-subtle {
    background-color: var(--purple-subtle);
    color: var(--kraken-purple);
    padding: 8px 12px;
    border-radius: 12px;
}

.btn-subtle:hover {
    background-color: rgba(133, 91, 251, 0.3);
}

.btn-secondary {
    background-color: rgba(148, 151, 169, 0.1);
    color: var(--near-white);
    padding: 13px 16px;
    border-radius: 12px;
}

.btn-secondary:hover {
    background-color: rgba(148, 151, 169, 0.2);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
}

.badge-success {
    background-color: rgba(30, 92, 138, 0.2);
    color: #4a9cc7;
}

.badge-neutral {
    background-color: rgba(104, 107, 130, 0.2);
    color: #9a9db0;
    border-radius: 8px;
}

.badge-bilibili {
    background-color: rgba(251, 114, 153, 0.2);
    color: var(--bilibili-pink);
    border-radius: 8px;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-dark);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: 'OPPO Sans 4.0', Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--kraken-purple);
    text-decoration: none;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(113, 50, 245, 0.5);
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--cool-gray);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--kraken-purple);
}

.nav-social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-social-icon {
    width: 36px;
    height: 36px;
    background-color: rgba(113, 50, 245, 0.1);
    border: 1px solid rgba(113, 50, 245, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cool-gray);
    transition: all 0.2s ease;
}

.nav-social-icon:hover {
    background-color: var(--purple-subtle);
    border-color: var(--kraken-purple);
    color: var(--kraken-purple);
    transform: translateY(-2px);
}

/* Hero Section - Gradient Background 1: Purple to Dark */
.hero {
    padding: 140px 0 80px;
    background: linear-gradient(180deg, 
        rgba(113, 50, 245, 0.15) 0%, 
        rgba(87, 65, 216, 0.08) 30%,
        rgba(10, 10, 15, 1) 100%);
    background-color: var(--dark-bg);
    background-image: url('../images/Marketplace Lunar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(10, 10, 15, 0.7) 0%,
        rgba(10, 10, 15, 0.85) 50%,
        rgba(10, 10, 15, 0.95) 100%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.hero-title {
    margin-bottom: 20px;
}

.hero-description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--cool-gray);
    margin-bottom: 32px;
    max-width: 480px;
}

.hitokoto {
    font-size: 16px;
    line-height: 1.8;
    color: var(--cool-gray);
    margin-bottom: 32px;
    max-width: 480px;
    font-style: italic;
    padding-left: 16px;
    border-left: 3px solid var(--kraken-purple);
}

.hitokoto-source {
    color: var(--silver-blue);
    font-size: 14px;
    margin-left: 8px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar-container {
    position: relative;
    width: 280px;
    height: 280px;
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-glow);
    position: relative;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, var(--kraken-purple) 0%, var(--purple-dark) 50%, var(--purple-deep) 100%);
    border-radius: 28px;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.6;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.avatar-ring {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 64px;
    height: 64px;
    background-color: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(30, 92, 138, 0.4);
    z-index: 2;
}

.avatar-ring svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

/* Skills Section - Combined Layout with Gradient Background 2: Blue-Purple to Dark */
.skills {
    padding: 80px 0;
    background: linear-gradient(45deg,
        rgba(99, 0, 180, 1) 0%,
        rgba(10, 0, 27, 0.08) 20%,
        rgba(10, 0, 27, 0.08) 50%,
        rgba(0, 19, 83, 1) 100%);
    background-color: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

.skills::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 30%, rgba(113, 50, 245, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 70%, rgba(30, 92, 138, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.skills-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    position: relative;
    z-index: 1;
}

.skills-column {
    display: flex;
    flex-direction: column;
}

.skills-column .section-header {
    text-align: left;
    margin-bottom: 32px;
}

.skills-column .section-header h2 {
    font-size: 28px;
}

.skills-column-learning .section-heading h2 {
    color: var(--near-white);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Card Glow Effect - 鼠标悬浮光环效果 */
[data-glow] {
    position: relative;
    overflow: hidden;
}

[data-glow]::before {
    content: '';
    position: absolute;
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(113, 50, 245, 0.5) 0%, rgba(113, 50, 245, 0.1) 40%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 0;
}

[data-glow]:hover::before {
    opacity: 1;
}

.skill-card {
    background-color: rgba(18, 18, 26, 0.8);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.skill-card:hover {
    border-color: var(--kraken-purple);
    box-shadow: 0 0 30px rgba(113, 50, 245, 0.2);
    transform: translateY(-2px);
}

.skill-card > * {
    position: relative;
    z-index: 1;
}

.skill-card-learning {
    border-color: rgba(42, 163, 255, 0.2);
}

.skill-card-learning:hover {
    border-color: var(--green);
    box-shadow: 0 0 30px rgba(42, 163, 255, 0.15);
}

.skill-card-learning[data-glow]::before {
    background: radial-gradient(circle, rgba(42, 163, 255, 0.35) 0%, transparent 70%);
}

.skill-icon {
    width: 48px;
    height: 48px;
    background-color: var(--purple-subtle);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.skill-icon svg {
    width: 24px;
    height: 24px;
    color: var(--kraken-purple);
}

.skill-icon-learning {
    background-color: rgba(30, 92, 138, 0.15);
}

.skill-icon-learning svg {
    color: var(--green);
}

.skill-card h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.skill-card p {
    color: var(--cool-gray);
    font-size: 14px;
    line-height: 1.6;
}

/* Projects Section - Gradient Background 3: Deep Purple to Dark */
.projects {
    padding: 80px 0;
    background: linear-gradient(0deg,
        rgba(10, 10, 15, 1) 0%,
        rgb(81, 0, 215) 100%);
    background-color: var(--dark-surface);
    position: relative;
    overflow: hidden;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 80% 20%, rgba(113, 50, 245, 0.06) 0%, transparent 50%),
                radial-gradient(ellipse at 20% 80%, rgba(87, 65, 216, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
}

.section-header p {
    margin-top: 12px;
    color: var(--cool-gray);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.project-card {
    background-color: rgba(26, 26, 37, 0.8);
    border: 1px solid var(--border-dark);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.project-card:hover {
    border-color: var(--kraken-purple);
    box-shadow: 0 0 30px rgba(113, 50, 245, 0.2);
    transform: translateY(-4px);
}

.project-card > * {
    position: relative;
    z-index: 1;
}

.project-card[data-glow]::before {
    background: radial-gradient(circle, rgba(113, 50, 245, 0.5) 0%, transparent 70%);
}

.project-image {
    height: 200px;
    background: linear-gradient(135deg, rgba(113, 50, 245, 0.1) 0%, rgba(87, 65, 216, 0.05) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-dark);
}

.project-image svg {
    width: 64px;
    height: 64px;
    color: var(--kraken-purple);
    opacity: 0.5;
}

.project-content {
    padding: 24px;
}

.project-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.project-card h3 {
    margin-bottom: 8px;
}

.project-card p {
    color: var(--cool-gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.project-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--kraken-purple);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.project-link:hover {
    color: #9a7af8;
}

.repo-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--silver-blue);
}

.repo-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Contact Section - Gradient Background 4: Green-Purple to Dark */
.contact {
    padding: 80px 0;
    background: radial-gradient(circle, rgb(58, 50, 167) 0%, transparent 70%);
    background-color: var(--dark-bg);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 30%, rgba(113, 50, 245, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 30% 70%, rgba(30, 92, 138, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.contact-content {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-info {
    text-align: center;
    width: 100%;
}

.contact-info h2 {
    margin-bottom: 16px;
}

.contact-info > p {
    color: var(--cool-gray);
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background-color: rgba(18, 18, 26, 0.8);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.contact-link:hover {
    border-color: var(--kraken-purple);
    box-shadow: 0 0 30px rgba(113, 50, 245, 0.2);
}

.contact-link > * {
    position: relative;
    z-index: 1;
}

.contact-link[data-glow]::before {
    background: radial-gradient(circle, rgba(113, 50, 245, 0.5) 0%, transparent 70%);
}

.contact-link-icon {
    width: 40px;
    height: 40px;
    background-color: var(--dark-elevated);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-micro);
}

.contact-link-icon svg {
    width: 20px;
    height: 20px;
    color: var(--kraken-purple);
}

.contact-link-text {
    flex: 1;
    text-align: left;
}

.contact-link-text span {
    display: block;
    font-size: 12px;
    color: var(--cool-gray);
    margin-bottom: 2px;
}

.contact-link-text strong {
    font-size: 16px;
    font-weight: 600;
    color: var(--near-white);
}

/* Footer */
.footer {
    padding: 40px 0;
    background-color: var(--dark-surface);
    border-top: 1px solid var(--border-dark);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--near-white);
}

.footer-text {
    font-size: 14px;
    color: var(--cool-gray);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--cool-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-dark);
    border-top-color: var(--kraken-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-visual {
        order: -1;
    }

    .avatar-container {
        width: 200px;
        height: 200px;
    }

    .skills-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .skills-column .section-header {
        text-align: center;
    }

    .skills-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .display-hero {
        font-size: 36px;
    }

    .section-heading {
        font-size: 28px;
    }

    .nav {
        display: none;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-social-icons {
        gap: 6px;
    }

    .nav-social-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .avatar-container {
        width: 160px;
        height: 160px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .nav-social-icons {
        display: none;
    }

    .skills-column .section-header h2 {
        font-size: 24px;
    }
}
