/* ==========================================================================
   std::cpp — Home / landing
   ========================================================================== */

.page-home {
    overflow-x: hidden;
}

/* ------------------------------------------------------------------ hero */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--nav-h));
    padding: 72px 0 92px;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto -10%;
    height: 780px;
    z-index: -1;
    background:
        radial-gradient(ellipse 42% 52% at 18% 24%, rgba(37, 99, 235, 0.12), transparent 68%),
        radial-gradient(ellipse 36% 44% at 78% 12%, rgba(6, 182, 212, 0.11), transparent 70%),
        radial-gradient(ellipse 30% 38% at 58% 48%, rgba(124, 58, 237, 0.07), transparent 72%);
    filter: blur(10px);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    left: -20%;
    right: -20%;
    bottom: -130px;
    height: 440px;
    z-index: -1;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.1) 1px, transparent 1px);
    background-size: 54px 54px;
    transform: perspective(460px) rotateX(61deg);
    transform-origin: center bottom;
    -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 72%);
    mask-image: linear-gradient(to top, #000 0%, transparent 72%);
    opacity: 0.55;
    pointer-events: none;
}

/* 旧版首页的粒子连线背景，叠加在新版 Hero 上 */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.85;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}

.hero-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    align-items: center;
    gap: clamp(32px, 5vw, 78px);
}

.hero-copy {
    max-width: 620px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 26px;
    padding: 7px 14px 7px 11px;
    border: 1px solid rgba(37, 99, 235, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 6px 18px -12px rgba(37, 99, 235, 0.4);
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: hero-rise 0.8s var(--ease) both;
}

.hero-badge b {
    color: var(--blue);
    font-weight: 600;
}

.hero h1 {
    margin: 0 0 24px;
    color: var(--ink);
    font-size: clamp(43px, 5.7vw, 72px);
    font-weight: 780;
    line-height: 1.08;
    letter-spacing: -0.05em;
    animation: hero-rise 0.9s 0.06s var(--ease) both;
}

.hero h1 .line {
    display: block;
}

.hero h1 .hero-accent {
    position: relative;
    display: inline-block;
    background: linear-gradient(100deg, #2563eb 0%, #06b6d4 36%, #7c3aed 68%, #2563eb 100%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradient-flow 7s ease-in-out infinite;
}

.hero h1 .hero-accent::after {
    content: "";
    position: absolute;
    left: 2%;
    right: 12%;
    bottom: 0.06em;
    height: 0.09em;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.5), rgba(6, 182, 212, 0.45), transparent);
    opacity: 0.55;
}

@keyframes gradient-flow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes hero-rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: none; }
}

.hero-lead {
    max-width: 540px;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
    animation: hero-rise 0.9s 0.14s var(--ease) both;
}

.hero-lead strong {
    color: var(--ink-2);
    font-weight: 600;
}

.hero-lead code {
    padding: 2px 6px;
    border-radius: 5px;
    color: var(--blue);
    background: rgba(37, 99, 235, 0.07);
    font-family: var(--mono);
    font-size: 0.9em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    animation: hero-rise 0.9s 0.22s var(--ease) both;
}

.hero-actions .btn-primary {
    min-height: 50px;
    padding-inline: 26px;
    font-size: 15px;
}

.hero-actions .btn-ghost {
    min-height: 50px;
    padding-inline: 22px;
    font-size: 15px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 26px;
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    animation: hero-rise 0.9s 0.3s var(--ease) both;
}

.hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted-2);
    font-size: 12px;
}

.hero-meta b {
    color: var(--ink-2);
    font-family: var(--mono);
    font-size: 11.5px;
    font-weight: 600;
}

.hero-meta i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--cyan);
}

/* ------------------------------------------------------------- hero code */

.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    perspective: 1400px;
    animation: hero-rise 1s 0.2s var(--ease) both;
}

.hero-orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 570px;
    height: 570px;
    margin: -285px 0 0 -285px;
    border: 1px dashed rgba(37, 99, 235, 0.16);
    border-radius: 50%;
    pointer-events: none;
    animation: spin 46s linear infinite;
}

.hero-orbit::before,
.hero-orbit::after {
    content: "";
    position: absolute;
    border-radius: 50%;
}

.hero-orbit::before {
    top: 15%;
    left: 2%;
    width: 8px;
    height: 8px;
    background: var(--cyan);
    box-shadow: 0 0 0 5px rgba(6, 182, 212, 0.12), 0 0 18px rgba(6, 182, 212, 0.65);
}

.hero-orbit::after {
    right: 6%;
    bottom: 20%;
    width: 6px;
    height: 6px;
    background: var(--violet);
    box-shadow: 0 0 0 5px rgba(124, 58, 237, 0.1), 0 0 16px rgba(124, 58, 237, 0.55);
}

.hero-orbit-2 {
    width: 460px;
    height: 460px;
    margin: -230px 0 0 -230px;
    border-style: solid;
    border-color: rgba(6, 182, 212, 0.09);
    animation-duration: 34s;
    animation-direction: reverse;
}

.hero-orbit-2::before {
    top: auto;
    left: auto;
    right: 12%;
    bottom: 4%;
    width: 5px;
    height: 5px;
    background: var(--blue);
}

.hero-orbit-2::after {
    top: 22%;
    left: 8%;
    right: auto;
    bottom: auto;
    width: 5px;
    height: 5px;
    background: #f59e0b;
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 500px;
    height: 380px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.2), rgba(6, 182, 212, 0.09) 45%, transparent 70%);
    filter: blur(30px);
    pointer-events: none;
}

.code-window {
    position: relative;
    z-index: 2;
    width: min(100%, 530px);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: linear-gradient(155deg, #0c1830 0%, #0a1428 56%, #101a30 100%);
    box-shadow:
        0 50px 100px -40px rgba(8, 20, 40, 0.75),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 0 80px -20px rgba(37, 99, 235, 0.28);
    transform-style: preserve-3d;
    transition: transform 0.2s ease-out;
    overflow: hidden;
}

.code-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 200px at 50% -10%, rgba(59, 130, 246, 0.16), transparent 65%);
    pointer-events: none;
}

.code-titlebar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(255, 255, 255, 0.025);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #334155;
}

.code-dot.red { background: #f87171; }
.code-dot.yellow { background: #fbbf24; }
.code-dot.green { background: #34d399; }

.code-file {
    margin-left: 10px;
    padding: 4px 12px;
    border-radius: 6px;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.08);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.02em;
}

.code-lang {
    margin-left: auto;
    padding: 3px 9px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    border-radius: 999px;
    color: #7dd3fc;
    background: rgba(56, 189, 248, 0.08);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.1em;
}

.code-body {
    position: relative;
    padding: 20px 0 22px;
    counter-reset: cpp-line;
}

.code-line {
    position: relative;
    min-height: 25px;
    padding: 0 22px 0 54px;
    color: #c9d5e7;
    font-family: var(--mono);
    font-size: 12.6px;
    line-height: 1.95;
    white-space: pre;
    opacity: 0;
    animation: code-line-in 0.45s var(--ease) forwards;
    animation-delay: calc(0.55s + var(--i) * 0.075s);
}

.code-line::before {
    counter-increment: cpp-line;
    content: counter(cpp-line);
    position: absolute;
    left: 0;
    width: 36px;
    text-align: right;
    color: #334860;
    font-size: 10.5px;
    -webkit-user-select: none;
    user-select: none;
}

.code-line:hover {
    background: rgba(148, 163, 184, 0.04);
}

@keyframes code-line-in {
    from { opacity: 0; transform: translateX(-7px); filter: blur(2px); }
    to { opacity: 1; transform: none; filter: none; }
}

.tok-pre { color: #f472b6; }
.tok-kw { color: #c084fc; }
.tok-type { color: #67e8f9; }
.tok-str { color: #fcd34d; }
.tok-num { color: #fb923c; }
.tok-fn { color: #93c5fd; }
.tok-com { color: #526580; font-style: italic; }
.tok-punc { color: #8193ad; }

.code-caret {
    display: inline-block;
    width: 7px;
    height: 14px;
    margin-left: 2px;
    border-radius: 1px;
    background: #38bdf8;
    vertical-align: -2px;
    animation: caret-blink 1.05s steps(1) infinite;
}

.code-statusbar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 36px;
    padding: 0 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: #5e7391;
    background: rgba(255, 255, 255, 0.02);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.04em;
}

.code-statusbar .ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #34d399;
}

.code-statusbar .ok::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 8px currentColor;
}

.code-statusbar .gcc {
    margin-left: auto;
}

.float-chip {
    position: absolute;
    z-index: 3;
    padding: 8px 12px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 9px;
    color: #1e40af;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px -18px rgba(37, 99, 235, 0.4);
    font-family: var(--mono);
    font-size: 10.5px;
    white-space: nowrap;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: float-y 6s ease-in-out infinite;
}

.float-chip::before {
    content: "";
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.8);
    vertical-align: 1px;
}

.float-chip-a {
    --rot: -5deg;
    top: 11%;
    left: -4%;
    animation-delay: -1s;
}

.float-chip-b {
    --rot: 4deg;
    top: 24%;
    right: -5%;
    animation-delay: -3.4s;
}

.float-chip-b::before {
    background: var(--violet);
    box-shadow: 0 0 8px rgba(124, 58, 237, 0.7);
}

.float-chip-c {
    --rot: 3deg;
    bottom: 16%;
    left: -7%;
    animation-delay: -2.2s;
}

.float-chip-c::before {
    background: #f59e0b;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

.compile-toast {
    position: absolute;
    z-index: 4;
    right: -3%;
    bottom: 3%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 15px;
    border: 1px solid rgba(37, 99, 235, 0.14);
    border-radius: 10px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 42px -22px rgba(15, 23, 42, 0.35);
    font-family: var(--mono);
    font-size: 10.5px;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    animation: float-y-soft 5.5s ease-in-out infinite;
}

.compile-toast .prompt {
    color: var(--blue);
    font-weight: 700;
}

.compile-toast .ok {
    color: var(--success);
}

.compile-toast.is-done {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 18px 42px -22px rgba(16, 185, 129, 0.4);
}

.scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.18em;
    transform: translateX(-50%);
    text-transform: uppercase;
}

.scroll-cue:hover {
    color: var(--blue);
}

.scroll-cue .track {
    position: relative;
    width: 22px;
    height: 35px;
    border: 1.5px solid rgba(37, 99, 235, 0.28);
    border-radius: 999px;
}

.scroll-cue .track::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 50%;
    width: 4px;
    height: 8px;
    margin-left: -2px;
    border-radius: 3px;
    background: var(--blue);
    animation: scroll-dot 1.8s ease-in-out infinite;
}

@keyframes scroll-dot {
    0% { opacity: 0; transform: translateY(-2px); }
    35% { opacity: 1; }
    80% { opacity: 0; transform: translateY(13px); }
    100% { opacity: 0; transform: translateY(13px); }
}

/* ----------------------------------------------------------------- ticker */

.ticker {
    position: relative;
    overflow: hidden;
    padding: 13px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.55);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: ticker-move 38s linear infinite;
}

.ticker-group {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

@keyframes ticker-move {
    to { transform: translateX(-50%); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.ticker-item::after {
    content: "◇";
    color: rgba(37, 99, 235, 0.3);
    font-size: 8px;
}

/* ---------------------------------------------------------------- sections */

.section {
    position: relative;
    padding: 96px 0;
}

.features-section {
    padding-top: 104px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 250px;
    padding: 26px 24px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: transform 0.35s var(--ease), box-shadow 0.35s ease, border-color 0.35s ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(37, 99, 235, 0.11), transparent 62%);
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.feature-card::after {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--shadow-md);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover::after {
    transform: scaleX(1);
}

.feature-index {
    position: absolute;
    top: 20px;
    right: 22px;
    color: rgba(37, 99, 235, 0.12);
    font-family: var(--mono);
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.06em;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-index {
    color: rgba(37, 99, 235, 0.22);
}

.feature-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 13px;
    color: var(--blue);
    background: var(--grad-soft);
    transition: transform 0.35s var(--ease);
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-card:hover .feature-icon {
    transform: rotate(-6deg) scale(1.06);
}

.feature-card h3 {
    margin: 0 0 9px;
    color: var(--ink);
    font-size: 16.5px;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.feature-code {
    margin-top: auto;
    padding-top: 17px;
    color: #7c93b5;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feature-code b {
    color: var(--blue);
    font-weight: 500;
}

/* ---------------------------------------------------------------- latest */

.latest-section {
    padding-top: 40px;
}

.latest-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent, rgba(238, 244, 255, 0.62) 26%, rgba(245, 248, 255, 0) 100%);
}

.latest-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(280px, 0.78fr);
    gap: 42px;
    align-items: start;
}

.latest-main .section-head {
    margin-bottom: 28px;
}

.latest-main .section-head h2 {
    margin: 12px 0 0;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 180px;
}

.home-post {
    position: relative;
    display: block;
    padding: 20px 24px 18px;
    border: 1px solid var(--line);
    border-radius: 15px;
    color: inherit;
    background: rgba(255, 255, 255, 0.68);
    animation: home-post-in 0.6s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 70ms + 80ms);
    transition: transform 0.3s var(--ease), box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

@keyframes home-post-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

.home-post::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--grad);
    transform: scaleY(0);
    transition: transform 0.3s var(--ease);
}

.home-post:hover {
    color: inherit;
    background: #fff;
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.home-post:hover::before {
    transform: scaleY(1);
}

.home-post .index {
    position: absolute;
    top: 16px;
    right: 20px;
    color: rgba(37, 99, 235, 0.1);
    font-family: var(--mono);
    font-size: 27px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.06em;
}

.home-post-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
    padding-right: 50px;
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.04em;
}

.home-post-top .post-cat {
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--blue);
    background: rgba(37, 99, 235, 0.07);
    font-size: 9.5px;
}

.home-post h3 {
    margin: 0 0 6px;
    padding-right: 44px;
    color: var(--ink-2);
    font-size: 17px;
    font-weight: 640;
    line-height: 1.45;
    letter-spacing: -0.015em;
    transition: color 0.2s ease;
}

.home-post:hover h3 {
    color: var(--blue);
}

.home-post p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-post-foot {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
    color: var(--muted-2);
    font-size: 10.5px;
}

.home-post-foot span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.home-post-foot svg {
    width: 12px;
    height: 12px;
}

.home-post-foot .arrow {
    margin-left: auto;
    color: rgba(37, 99, 235, 0.4);
    font-family: var(--mono);
    font-size: 13px;
    transition: transform 0.25s var(--ease), color 0.25s ease;
}

.home-post:hover .home-post-foot .arrow {
    color: var(--blue);
    transform: translateX(4px);
}

.post-skeleton {
    padding: 21px 24px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.62);
}

.post-skeleton .line {
    height: 10px;
    margin-bottom: 10px;
}

.post-skeleton .line.short {
    width: 42%;
}

.post-skeleton .line.title {
    width: 72%;
    height: 16px;
    margin-top: 6px;
}

.empty-posts {
    position: relative;
    padding: 44px 28px;
    border: 1px dashed rgba(37, 99, 235, 0.24);
    border-radius: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
}

.empty-posts .prompt {
    color: var(--blue);
    font-family: var(--mono);
    font-size: 13px;
}

.empty-posts p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.view-all {
    margin-top: 22px;
}

.latest-aside {
    position: sticky;
    top: calc(var(--nav-h) + 22px);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.about-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12.8px;
    line-height: 1.85;
}

.about-list {
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px dashed rgba(37, 99, 235, 0.1);
    color: var(--text);
    font-size: 12px;
}

.about-list li span {
    color: var(--blue);
    font-family: var(--mono);
    font-size: 9.5px;
}

.about-snippet {
    margin-top: 14px;
    padding: 12px 13px;
    border-radius: 9px;
    color: #8aa0bd;
    background: #0c1830;
    font-family: var(--mono);
    font-size: 9.8px;
    line-height: 1.9;
    overflow: hidden;
}

.about-snippet .kw {
    color: #c084fc;
}

.about-snippet .fn {
    color: #7dd3fc;
}

.about-snippet .str {
    color: #fcd34d;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-cloud .tag {
    cursor: pointer;
}

.tag-empty {
    color: var(--muted-2);
    font-family: var(--mono);
    font-size: 11px;
}

.side-stats {
    padding: 18px 20px;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}

.mini-stat {
    text-align: center;
}

.mini-stat strong {
    display: block;
    color: var(--ink);
    font-family: var(--mono);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.mini-stat span {
    color: var(--muted-2);
    font-size: 10px;
}

/* -------------------------------------------------------------------- cta */

.cta-wrap {
    padding: 40px 0 0;
}

.cta-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 48px;
    align-items: center;
    padding: 58px 56px;
    border: 1px solid var(--line);
    border-radius: 28px;
    color: var(--ink);
    background:
        radial-gradient(ellipse 50% 80% at 88% 0%, rgba(37, 99, 235, 0.06), transparent 65%),
        radial-gradient(ellipse 40% 70% at 4% 100%, rgba(6, 182, 212, 0.05), transparent 70%),
        linear-gradient(140deg, #ffffff, #f8fafc 54%, #f1f5f9);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.cta-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse 80% 100% at 70% 0%, #000, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 100% at 70% 0%, #000, transparent 75%);
    pointer-events: none;
}

.cta-content,
.cta-side {
    position: relative;
    z-index: 1;
}

.cta-content .eyebrow {
    color: #2563eb;
}

.cta-content h2 {
    margin: 16px 0 14px;
    color: var(--ink);
    font-size: clamp(28px, 3.4vw, 43px);
    font-weight: 720;
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.cta-content h2 code {
    padding: 2px 9px;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.06);
    font-family: var(--mono);
    font-size: 0.72em;
    font-weight: 500;
    vertical-align: 0.08em;
}

.cta-content p {
    max-width: 480px;
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
}

.cta-terminal {
    padding: 18px 20px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(2, 8, 20, 0.5);
    box-shadow: inset 0 0 50px rgba(37, 99, 235, 0.05);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.cta-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 13px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.cta-terminal-bar .code-dot {
    width: 7px;
    height: 7px;
}

.cta-terminal-bar span:last-child {
    margin-left: auto;
    color: #526580;
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.1em;
}

.cta-terminal pre {
    margin: 0;
    color: #9fb2ca;
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 2;
    white-space: pre-wrap;
}

.cta-terminal .prompt {
    color: #34d399;
}

.cta-terminal .kw {
    color: #c084fc;
}

.cta-terminal .str {
    color: #fcd34d;
}

.cta-terminal .ok {
    color: #34d399;
}

.cta-terminal .dim {
    color: #526580;
}

.cta-actions .btn-light {
    color: #fff;
    background: var(--grad);
    background-size: 160% 160%;
    box-shadow: 0 12px 26px -12px rgba(37, 99, 235, 0.7);
}

.cta-actions .btn-outline-light {
    color: var(--ink-2);
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--line);
    box-shadow: var(--shadow-xs);
}

.cta-actions .btn-outline-light:hover {
    color: var(--blue);
    background: #fff;
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* --------------------------------------------------------------- responsive */

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

    .feature-card {
        min-height: 220px;
    }

    .float-chip-c {
        left: -2%;
    }

    .float-chip-a {
        left: -2%;
    }
}

@media (max-width: 1024px) {
    .hero {
        min-height: auto;
        padding-top: 58px;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
        gap: 28px;
    }

    .hero-orbit {
        width: 460px;
        height: 460px;
        margin: -230px 0 0 -230px;
    }

    .hero-orbit-2 {
        width: 370px;
        height: 370px;
        margin: -185px 0 0 -185px;
    }

    .code-line {
        font-size: 11.4px;
        padding-left: 47px;
        padding-right: 16px;
    }

    .float-chip {
        font-size: 9.5px;
        padding: 7px 10px;
    }

    .compile-toast {
        right: -1%;
        font-size: 9.5px;
    }

    .latest-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.75fr);
        gap: 28px;
    }
}

@media (max-width: 900px) {
    .hero {
        padding: 54px 0 76px;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 58px;
    }

    .hero-copy {
        max-width: 680px;
    }

    .hero h1 {
        font-size: clamp(40px, 7.6vw, 62px);
    }

    .hero-visual {
        width: min(100%, 600px);
        min-height: 460px;
        margin: 0 auto;
    }

    .hero-orbit {
        width: 540px;
        height: 540px;
        margin: -270px 0 0 -270px;
    }

    .hero-orbit-2 {
        width: 430px;
        height: 430px;
        margin: -215px 0 0 -215px;
    }

    .code-window {
        width: min(100%, 540px);
    }

    .code-line {
        font-size: 12.4px;
        padding-left: 52px;
    }

    .float-chip-a {
        left: -1%;
    }

    .float-chip-b {
        right: -1%;
    }

    .float-chip-c {
        left: 0;
    }

    .compile-toast {
        right: 0;
    }

    .scroll-cue {
        display: none;
    }

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

    .latest-aside {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .latest-aside .side-stats {
        grid-column: 1 / -1;
    }

    .cta-card {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        padding: 46px 40px;
    }

    .cta-terminal {
        max-width: 520px;
    }
}

@media (max-width: 620px) {
    .section {
        padding: 68px 0;
    }

    .hero {
        padding-top: 44px;
    }

    .hero-badge {
        font-size: 9.5px;
        letter-spacing: 0.06em;
    }

    .hero h1 {
        font-size: clamp(36px, 11vw, 50px);
    }

    .hero-lead {
        font-size: 14.5px;
    }

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

    .hero-actions .btn {
        width: 100%;
    }

    .hero-meta {
        gap: 10px 18px;
        margin-top: 30px;
    }

    .hero-visual {
        min-height: 390px;
    }

    .hero-orbit {
        width: 400px;
        height: 400px;
        margin: -200px 0 0 -200px;
        opacity: 0.7;
    }

    .hero-orbit-2 {
        display: none;
    }

    .code-titlebar {
        height: 42px;
        padding-inline: 12px;
    }

    .code-file {
        font-size: 9.5px;
        padding: 3px 8px;
    }

    .code-line {
        font-size: 10.4px;
        line-height: 2.05;
        padding-left: 44px;
        padding-right: 12px;
    }

    .code-line::before {
        width: 28px;
    }

    .code-statusbar {
        gap: 10px;
        font-size: 8.5px;
    }

    .float-chip {
        display: none;
    }

    .compile-toast {
        right: 50%;
        bottom: -18px;
        transform: translateX(50%);
        animation: none;
        font-size: 9px;
    }

    .ticker-item {
        font-size: 10px;
    }

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

    .feature-card {
        min-height: 0;
    }

    .latest-aside {
        grid-template-columns: minmax(0, 1fr);
    }

    .latest-aside .side-stats {
        grid-column: auto;
    }

    .section-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .home-post {
        padding: 18px 18px 16px;
    }

    .home-post .index {
        font-size: 22px;
        right: 16px;
    }

    .home-post h3 {
        font-size: 15.5px;
        padding-right: 30px;
    }

    .cta-card {
        padding: 36px 24px;
        border-radius: 22px;
    }

    .cta-content h2 {
        font-size: 27px;
    }

    .cta-actions .btn {
        width: 100%;
    }
}

/* ---------------------------------------------------------------- cppreference */

.cppref-section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.cppref-section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 50% 40% at 85% 50%, rgba(37, 99, 235, 0.06), transparent 60%),
        radial-gradient(ellipse 40% 50% at 15% 70%, rgba(6, 182, 212, 0.05), transparent 55%);
    pointer-events: none;
}

.cppref-wrap {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.cppref-wrap:hover {
    border-color: rgba(37, 99, 235, 0.18);
    box-shadow: var(--shadow-md);
}

#cpprefFrame {
    width: 100%;
    height: 640px;
    border: none;
    display: block;
}

@media (max-width: 1024px) {
    #cpprefFrame {
        height: 520px;
    }
}

@media (max-width: 640px) {
    .cppref-wrap {
        border-radius: 14px;
    }

    #cpprefFrame {
        height: 420px;
    }
}
