.is-hidden { display: none !important; }

/* ====== Base, Theme, Utilities ====== */
    :root {
      --bg: #0b0b0c;
      --panel: #111215;
      --text: #e9e9ee;
      --muted: #bda8a8;
      --accent: #ff7a1a;
      --accent-2: #ff8a8a;
      --border: #1e2026;
      --shadow: 0 10px 30px rgba(0,0,0,.35);
      --radius: 16px;
      --maxw: 1100px;
    }

    /* Light mode (respects system preference; remove if you want dark-only) */
    @media (prefers-color-scheme: light) {
      :root {
        --bg: #f7f7fb;
        --panel: #ffffff;
        --text: #1a1515;
        --muted: #745c5c;
        --accent: #ff6a5a;
        --accent-2: #ff634f;
        --border: #e9e9f1;
        --shadow: 0 10px 30px rgba(16,22,60,.08);
      }
    }

    body {
      margin: 0;
      font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
      color: var(--text);
      background: radial-gradient(1000px 600px at 110% -10%, rgba(255, 26, 26, 0.12), transparent 60%),
                  radial-gradient(800px 500px at -10% -20%, rgba(138,180,255,.12), transparent 55%),
                  var(--bg);
      line-height: 1.6;
    }

    .container { width: min(100%, var(--maxw)); margin: 0 auto; padding: 0 20px; }

    a { color: inherit; text-decoration: none; }
    img { max-width: 100%; display: block; }
    code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

    .btn {
      display: inline-flex; align-items: center; gap: .5rem;
      padding: .7rem 1rem; border-radius: 999px; border: 1px solid var(--border);
      background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(0,0,0,.02));
      box-shadow: var(--shadow);
      transition: transform .12s ease, border-color .2s ease, background .2s ease;
      will-change: transform;
    }
    .btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.15); }
    .btn--accent { background: linear-gradient(180deg, rgba(255,122,26,.18), rgba(255,122,26,.08)); border-color: rgba(255,122,26,.25); }

    .chip { display: inline-block; font-size: .8rem; padding: .25rem .6rem; border-radius: 999px; background: rgba(255, 138, 138, 0.15); color: var(--accent-2); border: 1px solid rgba(94, 19, 19, 0.25); }

    /* ====== Header ====== */
    header.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--bg), transparent 15%); }
    .nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 0; }
    .brand { display: flex; align-items: center; gap: .8rem; }
    .brand-logo { width: 38px; height: 38px; border-radius: 10px; background: radial-gradient(80% 80% at 30% 20%, #fff3, transparent), linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow); }
    .brand h1 { font-size: 1.1rem; letter-spacing: .5px; margin: 0; }

    .nav-links { display: flex; gap: .8rem; align-items: center; }
    .nav-links a { padding: .6rem .8rem; border-radius: 10px; border: 1px solid transparent; }
    .nav-links a:hover { border-color: var(--border); background: color-mix(in oklab, var(--panel), transparent 20%); }

    /* ====== Hero ====== */
    .hero { padding: 46px 0 24px; }
    .hero-wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; }
    .hero h2 { font-size: clamp(1.6rem, 2.4vw + .8rem, 2.6rem); line-height: 1.2; margin: 0 0 .6rem; }
    .hero p { color: var(--muted); margin: 0 0 1.1rem; }
    .hero .hero-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }

    @media (max-width: 860px) {
      .hero-wrap { grid-template-columns: 1fr; }
    }

    /* ====== Article Grid ====== */
    .section-title { font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }

    .grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 20px; }
    .card { grid-column: span 4; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 100%; }
    .card.thumbless { padding: 16px; }
    .card-media { aspect-ratio: 16/9; background: linear-gradient(135deg, #20222a, #121319); }
    .card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
    .card-title { font-size: 1.05rem; line-height: 1.35; margin: 0; }
    .card-excerpt { color: var(--muted); margin: 0; }
    .meta { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); }

    .card:hover .card-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }

    @media (max-width: 1024px) { .card { grid-column: span 6; } }
    @media (max-width: 640px)  { .card { grid-column: span 12; } }

    /* ====== Pagination ====== */
    .pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px 0 38px; }
    .page { padding: .5rem .85rem; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
    .page.is-active { border-color: rgba(255,122,26,.35); background: linear-gradient(180deg, rgba(255,122,26,.12), transparent); }

    /* ====== Single Post ====== */
    .post { margin: 34px 0 54px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
    .post-hero { aspect-ratio: 16/7; background: linear-gradient(135deg, #20222a, #121319); }
    .post-inner { padding: clamp(16px, 2vw + 8px, 28px); }
    .post h1 { font-size: clamp(1.6rem, 2.4vw + .8rem, 2.4rem); line-height: 1.2; margin: 0 0 .4rem; }
    .post .post-meta { color: var(--muted); display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

    .post-content { color: var(--text); }
    .post-content h2 { margin: 1.4rem 0 .4rem; }
    .post-content p { margin: .85rem 0; }
    .post-content ul, .post-content ol { margin: .8rem 0 .8rem 1.2rem; }
    .post-content blockquote { margin: 1rem 0; padding: .8rem 1rem; border-left: 4px solid var(--accent); background: color-mix(in oklab, var(--panel), transparent 10%); border-radius: 8px; }
    .post-content pre { background: #0c0d10; color: #e9e9ee; padding: 14px; border-radius: 12px; overflow-x: auto; border: 1px solid #1b1d24; }
    .post-content code { background: rgba(255,255,255,.08); padding: .1rem .3rem; border-radius: 6px; }
    .post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

    /* ====== Footer ====== */
    footer { border-top: 1px solid var(--border); padding: 28px 0 48px; color: var(--muted); font-size: .95rem; }

    /* ====== Helpers ====== */
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }