:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-alt: #eef4ff;
    --text: #1f2937;
    --muted: #5b6474;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    --border: #dbe5f2;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --radius-lg: 26px;
    --radius-md: 18px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Noto Sans CJK SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

.container,
.nav-inner,
.footer-inner {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(219, 229, 242, 0.8);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 800;
    font-size: 1.05rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.page-shell {
    padding: 2rem 0 3rem;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 1.5rem;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #1d4ed8, #3b82f6 58%, #7dd3fc 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero-copy h1,
.page-hero h1 {
    font-size: clamp(2.1rem, 4vw, 3.4rem);
    line-height: 1.12;
    margin: 0.9rem 0 1rem;
}

.hero-copy p,
.page-hero p {
    max-width: 760px;
    opacity: 0.96;
}

.kicker,
.tag,
.pill,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    font-size: 0.92rem;
}

.kicker,
.badge {
    padding: 0.45rem 0.85rem;
}

.kicker {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
}

.badge {
    background: rgba(255, 255, 255, 0.16);
}

.tag,
.pill {
    padding: 0.35rem 0.8rem;
    background: var(--surface-alt);
    color: var(--primary-dark);
    font-weight: 700;
}

.hero-badges,
.button-row,
.inline-list {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hero-badges {
    margin: 1.4rem 0;
}

.button-row {
    margin-top: 1.4rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.88rem 1.2rem;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.16);
}

.button.primary {
    background: #fff;
    color: var(--primary-dark);
}

.button.secondary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.button.outline {
    color: var(--primary-dark);
    border-color: var(--border);
    background: var(--surface);
}

.panel,
.card,
.metric-card,
.repo-card,
.timeline-item,
.link-card,
.contact-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
}

.hero-panel {
    background: rgba(8, 20, 54, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    padding: 1.35rem;
}

.hero-panel h2,
.section-heading h2 {
    margin-bottom: 0.6rem;
}

.hero-panel .stat-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.hero-panel .stat-item {
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.12);
}

.hero-panel .stat-item strong {
    display: block;
    font-size: 1.1rem;
}

.section {
    margin-top: 2rem;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1rem;
}

.section-heading p,
.muted,
.small-note {
    color: var(--muted);
}

.grid-3,
.grid-2,
.repo-grid,
.links-grid,
.metrics-grid,
.contact-grid,
.timeline {
    display: grid;
    gap: 1.2rem;
}

.grid-3,
.repo-grid,
.contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card,
.repo-card,
.link-card,
.contact-card,
.metric-card,
.timeline-item {
    padding: 1.35rem;
}

.card,
.repo-card,
.link-card,
.contact-card,
.metric-card,
.timeline-item,
.market-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.repo-card:hover,
.link-card:hover,
.contact-card:hover,
.metric-card:hover,
.timeline-item:hover,
.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
    border-color: #c6d4ea;
}

.metric-card strong {
    display: block;
    font-size: 1.7rem;
    color: var(--primary-dark);
    margin-top: 0.35rem;
}

.metric-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.repo-card h3,
.link-card h3,
.contact-card h3,
.card h3,
.timeline-item h3 {
    margin: 0.85rem 0 0.5rem;
}

.repo-meta,
.repo-stats {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.star-grid .repo-card,
.star-card {
    background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}

.star-card .tag {
    background: #fff4db;
    color: #9a6700;
}

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

.timeline-item {
    display: grid;
    gap: 0.35rem;
}

.timeline-label {
    color: var(--primary-dark);
    font-weight: 800;
}

.profile-card {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 1rem;
    padding: 1.35rem;
}

.avatar {
    width: 112px;
    height: 112px;
    border-radius: 24px;
    object-fit: cover;
    border: 3px solid rgba(37, 99, 235, 0.12);
}

.signature {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #fff7ed);
    border: 1px solid #dbeafe;
    color: #1e3a8a;
}

.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.2rem;
}

.market-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow);
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
}

.market-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #7c3aed, #f59e0b);
}

.market-card > * {
    position: relative;
}

.market-card small {
    color: var(--muted);
    font-size: 0.88rem;
}

.market-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0.35rem 0 0.2rem;
}

.market-change {
    display: inline-block;
    font-size: 0.92rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--muted);
}

.market-change.up {
    color: #16a34a;
}

.market-change.down {
    color: #dc2626;
}

.market-card .market-note {
    margin-top: 0.55rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.market-facts {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(219, 229, 242, 0.9);
}

.market-fact {
    display: grid;
    gap: 0.2rem;
}

.market-fact dt {
    font-size: 0.8rem;
    color: var(--muted);
}

.market-fact dd {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 980px) {
    .market-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .market-grid {
        grid-template-columns: 1fr;
    }
}

.footer {
    padding: 2rem 0 2.4rem;
    background: #111827;
    color: rgba(255, 255, 255, 0.88);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.status {
    margin-top: 0.9rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
}

.status-inline {
    margin-top: 0.8rem;
    font-size: 0.95rem;
    color: var(--muted);
}

@media (max-width: 980px) {
    .hero,
    .metrics-grid,
    .grid-3,
    .grid-2,
    .repo-grid,
    .contact-grid,
    .timeline,
    .profile-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-inner,
    .section-heading,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero,
    .page-hero {
        padding: 1.4rem;
    }

    .container,
    .nav-inner,
    .footer-inner {
        width: min(100% - 1.2rem, 1180px);
    }
}
