:root {
    --bg: #07161a;
    --bg-2: #0a1e24;
    --text: #f6f7fb;
    --muted: #c9cce3;
    --primary: #22c55e;   /* 运动绿 */
    --primary-2: #0ea5e9; /* 天空蓝 */
    --accent: #facc15;    /* 亮黄 */
    --card: #0d1b22;
    --card-2: #102534;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 6px 12px rgba(0, 0, 0, .25);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 800px at 20% -10%, rgba(34, 197, 94, .25), transparent 60%),
        radial-gradient(900px 600px at 120% 10%, rgba(14, 165, 233, .18), transparent 50%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
}

/* Navbar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(9, 12, 26, .7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}


.logo {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: .5px;
    color: white;
    text-decoration: none;
    background: linear-gradient(90deg, var(--primary), var(--primary-2), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    padding-left: 40px;
}

.logo-icon {
    position: absolute;
    top: 0;
    left: 0;
}

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

.nav-links {
    display: flex;
    list-style: none;
    gap: 14px;
    margin: 0;
    padding: 0
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 600;
    font-size: .95rem;
    transition: all .2s ease;
}

.nav-links a:hover {
    color: white;
    background: rgba(124, 58, 237, .15)
}

.menu-toggle {
    display: none;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .25), rgba(6, 182, 212, .25));
    color: white;
    font-weight: 700;
}

/* Drawer */
.drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 280px;
    height: 100vh;
    z-index: 60;
    background: rgba(12, 16, 38, .98);
    backdrop-filter: blur(8px);
    border-left: 1px solid var(--border);
    transition: right .25s ease;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    right: 0
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
}

.drawer-close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
}

.drawer-list {
    list-style: none;
    padding: 8px 0;
    margin: 0
}

.drawer-list li a {
    display: block;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px dashed var(--border);
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    backdrop-filter: blur(2px);
    z-index: 55;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.drawer-backdrop.show {
    opacity: 1;
    pointer-events: auto
}

/* Sections */
main {
    padding: 18px
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 4px
}

.section-title {
    font-size: 1.2rem;
    letter-spacing: .3px
}

.section-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700
}

/* Grid Cards */
.grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

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

.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    border-color: rgba(124, 58, 237, .4)
}

.thumb {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #101532;
}

.card-meta {
    padding: 12px 12px 14px
}

.card-title {
    font-size: 1rem;
    margin: .2rem 0 .35rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
}

.card-date {
    color: var(--muted);
    font-size: .85rem
}

/* Hero / Post */
.post .post-article {
    max-width: 980px;
    margin: 0 auto;
    padding: 10px 8px 24px;
}

.post-hero {
    margin: 0 auto 12px;
    border-radius: 18px;
    height: 240px;
    width: 100%;
    max-width: 980px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: var(--shadow);
}

.post-title {
    font-size: 1.75rem;
    margin: 6px 4px
}

.post-meta {
    color: var(--muted);
    margin: 0 4px 10px
}

.post-content {
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.post-content h1 {
    font-size: 1.5rem;
    margin: 0;
}

.post-content img {
    max-width: 600px;
    width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto
}

.post-content p,
.post-content li {
    color: var(--text);
    line-height: 1.75
}

.post-content a {
    color: var(--primary-2);
}

.post-content main {
    padding: 0;
}

/* Carousel base section spacing on index also uses here */
.hero {
    margin: 6px 0 12px
}

/* Footer */
.site-footer {
    margin-top: 24px;
    border-top: 1px solid var(--border);
    background: rgba(10, 14, 30, .75);
    backdrop-filter: blur(10px);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-inner a {
    color: var(--muted);
}

/* Back to top */
.back-to-top {
    width: 40px;
    height: 40px;
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 70;
    border: none;
    cursor: pointer;
    border-radius: 14px;
    padding: 10px 12px 8px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.show {
    opacity: 1;
    transform: translateY(0)
}

/* Sentinel */
.io-sentinel {
    height: 1px;
}

/* Responsive top nav */
@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

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

/* Accessibility focus */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-2);
    outline-offset: 2px
}