:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #eef4ff;
    --text: #172033;
    --muted: #5f6b85;
    --line: rgba(23, 32, 51, 0.08);
    --brand: #1f6feb;
    --brand-dark: #123a70;
    --shadow: 0 24px 60px rgba(23, 32, 51, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --content-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(31, 111, 235, 0.16), transparent 24%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 18%),
        linear-gradient(180deg, #f9fbff 0%, #f4f7fb 32%, #eef3f9 100%);
    color: var(--text);
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.page-shell {
    min-height: 100vh;
}

.container {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(18px);
    background: rgba(248, 251, 255, 0.84);
    border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #1f6feb, #3fb8ff);
    box-shadow: 0 14px 30px rgba(31, 111, 235, 0.28);
    position: relative;
}

.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
}

.brand-mark::before {
    width: 20px;
    height: 6px;
    left: 14px;
    top: 14px;
    transform: rotate(-35deg);
}

.brand-mark::after {
    width: 24px;
    height: 6px;
    left: 11px;
    top: 26px;
    transform: rotate(35deg);
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--muted);
    transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #ffffff;
    background: linear-gradient(135deg, #1f6feb, #3fb8ff);
    box-shadow: 0 12px 26px rgba(31, 111, 235, 0.24);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-pill {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.08);
    color: var(--brand-dark);
    font-size: 13px;
}

.hero {
    padding: 44px 0 24px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #102346 0%, #1f4e88 55%, #3ca6ff 100%);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    padding: 42px;
    color: #ffffff;
}

.hero-card::before,
.hero-card::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.hero-card::before {
    width: 320px;
    height: 320px;
    right: -90px;
    top: -120px;
}

.hero-card::after {
    width: 220px;
    height: 220px;
    right: 210px;
    bottom: -110px;
}

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

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 13px;
}

.hero-title {
    margin: 20px 0 16px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.08;
}

.hero-copy {
    max-width: 640px;
    margin: 0 0 28px;
    font-size: 16px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.84);
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    background: #ffffff;
    color: #14315e;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.page-btn {
    background: rgba(31, 111, 235, 0.1);
    color: var(--brand-dark);
}

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

.hero-side {
    display: grid;
    gap: 16px;
}

.hero-stat,
.info-card,
.stack-card,
.post-card,
.detail-card,
.side-card,
.empty-card {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-stat {
    padding: 20px 22px;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    box-shadow: none;
}

.hero-stat strong {
    display: block;
    font-size: 30px;
    margin-bottom: 8px;
}

.section {
    padding: 18px 0 12px;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title {
    margin: 0;
    font-size: 28px;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.metrics-grid,
.stack-grid,
.post-grid,
.layout-grid,
.detail-grid,
.related-grid,
.contact-grid {
    display: grid;
    gap: 20px;
}

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

.info-card {
    padding: 24px;
}

.info-label {
    color: var(--muted);
    font-size: 13px;
}

.info-value {
    margin-top: 10px;
    font-size: 28px;
    font-weight: 700;
}

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

.stack-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stack-card:hover,
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 28px 60px rgba(23, 32, 51, 0.16);
}

.stack-cover {
    padding: 26px;
    min-height: 190px;
}

.stack-body {
    padding: 24px;
}

.stack-name {
    margin: 0;
    font-size: 22px;
}

.stack-desc,
.post-excerpt,
.detail-copy,
.side-list a,
.related-meta,
.meta-line,
.footer-copy,
.contact-item span,
.filter-summary,
.empty-copy {
    color: var(--muted);
    line-height: 1.8;
}

.stack-meta {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.chip-row,
.filter-row,
.tag-row,
.meta-row,
.pagination {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.chip,
.filter-chip,
.tag,
.meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(31, 111, 235, 0.08);
    color: var(--brand-dark);
    font-size: 13px;
}

.filter-chip {
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s ease;
}

.filter-chip.is-active,
.filter-chip:hover {
    background: linear-gradient(135deg, #1f6feb, #3fb8ff);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(31, 111, 235, 0.2);
}

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

.post-card {
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.post-cover {
    aspect-ratio: 16 / 9;
    width: 100%;
    object-fit: cover;
    background: var(--panel-soft);
}

.post-body {
    padding: 22px;
}

.post-title {
    margin: 14px 0 12px;
    font-size: 21px;
    line-height: 1.45;
}

.post-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: var(--muted);
}

.layout-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.85fr);
    align-items: start;
}

.detail-grid {
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
    align-items: start;
}

.list-shell,
.detail-card,
.side-card,
.empty-card {
    padding: 26px;
}

.list-hero {
    margin-bottom: 18px;
    padding: 26px;
    border-radius: var(--radius-lg);
    color: #ffffff;
    background: linear-gradient(135deg, #12213f 0%, #1b4e83 60%, #48b0ff 100%);
    box-shadow: var(--shadow);
}

.list-hero h1,
.detail-title {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.2;
}

.side-card h3,
.panel-title {
    margin: 0 0 14px;
    font-size: 20px;
}

.side-list {
    display: grid;
    gap: 14px;
}

.side-item {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.side-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.side-item strong,
.related-title {
    display: block;
    margin-bottom: 6px;
    line-height: 1.5;
}

.detail-cover {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 22px 0 26px;
    box-shadow: 0 20px 46px rgba(23, 32, 51, 0.14);
}

.detail-copy {
    margin: 0 0 16px;
    font-size: 16px;
}

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

.contact-item {
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(240, 246, 255, 0.95));
    border: 1px solid rgba(31, 111, 235, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 18px 44px rgba(23, 32, 51, 0.08);
}

.contact-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
}

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

.related-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fbfdff;
}

.empty-card {
    text-align: center;
}

.footer {
    padding: 32px 0 44px;
}

.footer-box {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 45px rgba(23, 32, 51, 0.08);
}

.footer-copy a {
    color: var(--brand);
}

.fade-up {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.6s ease forwards;
}

.fade-up.delay-1 { animation-delay: 0.08s; }
.fade-up.delay-2 { animation-delay: 0.16s; }
.fade-up.delay-3 { animation-delay: 0.24s; }
.fade-up.delay-4 { animation-delay: 0.32s; }

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

@media (max-width: 1080px) {
    .hero-grid,
    .layout-grid,
    .detail-grid,
    .metrics-grid,
    .stack-grid,
    .post-grid,
    .contact-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-grid,
    .layout-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 20px, var(--content-width));
    }

    .header-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-title {
        font-size: 22px;
    }

    .hero-card,
    .list-shell,
    .detail-card,
    .side-card,
    .empty-card,
    .list-hero,
    .footer-box {
        padding: 20px;
    }

    .hero {
        padding-top: 24px;
    }

    .hero-title {
        font-size: 34px;
    }

    .metrics-grid,
    .stack-grid,
    .post-grid,
    .contact-grid,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .site-nav,
    .header-cta,
    .hero-actions,
    .filter-row,
    .pagination,
    .meta-row,
    .detail-meta,
    .post-meta,
    .chip-row {
        width: 100%;
    }
}
