/* =========================
 *   IPGizmo — Global Theme
 *   ========================= */
:root{
    --bg:#0e1116;        /* page background */
    --fg:#e8ecf1;        /* primary text */
    --muted:#9aa5b1;     /* secondary text */
    --card:#161b22;      /* card background */
    --accent:#4aa3ff;    /* electric blue */
    --accent-2:#3391f5;  /* accent hover */
    --border:#222831;    /* borders */
    --good:#43c463; --warn:#f5c451; --err:#ff6b6b;
    --shadow:0 8px 20px rgba(0,0,0,.45);
}

*{box-sizing:border-box}
html,body{
    margin:0; padding:0; background:var(--bg); color:var(--fg);
    font:16px/1.55 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Inter,Arial,sans-serif;
    -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}
a{color:var(--accent); text-decoration:none}
a:hover{text-decoration:underline}

/* =========================
 *   Layout
 *   ========================= */
.container{max-width:1100px;margin:0 auto;padding:16px}
main.container{margin-top:8px}                  /* tighter top spacing */
.site-header{position:sticky;top:0;background:rgba(14,17,22,.95);
    border-bottom:1px solid var(--border);backdrop-filter:blur(6px);z-index:10}
    .header-inner{display:flex;justify-content:space-between;align-items:center;padding:16px 16px}
    .brand{font-weight:800;font-size:22px;color:var(--fg);}
    .brand:hover {text-decoration: none;}
    .brand .dot{color:var(--accent)}
    .top-nav a{margin-left:18px;font-weight:500;opacity:.9}
    .top-nav a:hover{opacity:1;color:var(--accent); text-decoration: none;}
    .site-footer{border-top:1px solid var(--border);margin-top:32px;font-size:14px;color:var(--muted)}
    .footer-inner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}

    /* =========================
     *   Hero (Gizmo head + copy)
     *   ========================= */
    .hero{margin:12px 0 28px}
    .hero-inner{display:flex;align-items:center;justify-content:center;gap:28px;flex-wrap:wrap}
    .hero-art{text-align:center;flex:0 0 220px; margin-top: 32px;}
    .gizmo-hero{max-width:200px;height:auto;filter:drop-shadow(0 0 12px rgba(74,163,255,.4))}
    .hero-copy{flex:1;min-width:280px}
    .hero-copy h1{
        font-size:34px;margin:0 0 10px;
        background:linear-gradient(90deg,var(--accent),var(--accent-2));
        -webkit-background-clip:text;-webkit-text-fill-color:transparent;
    }
    .lead{font-size:18px;color:var(--muted)}

    /* Rotating quip: stable height, fade-in */
    .quip-wrap{display:flex;align-items:center;overflow:visible}
    .quip{opacity:.95;transition:opacity .35s ease;line-height:1.45}
    .quip-in{opacity:1}

    /* =========================
     *   Cards / Content
     *   ========================= */
    .card{
        background:var(--card);border:1px solid var(--border);border-radius:12px;
        padding:18px;box-shadow:var(--shadow);margin-bottom:18px
    }
    h1{margin:.2em 0 .5em;font-size:26px}
    h2{margin:.6em 0 .3em;font-size:20px}
    h3{margin:.5em 0 .3em;font-size:16px}
    .muted{color:var(--muted)} .small{font-size:13px}

    /* Grid helpers */
    .grid.two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
    .grid.two.equal{align-items:stretch}
    .grid.two.equal > .card{display:flex;flex-direction:column}

    /* Key-value list */
    .kv{list-style:none;margin:0;padding:0}
    .kv li{display:flex;justify-content:space-between;border-bottom:1px dashed var(--border);padding:8px 0}
    .kv li span{color:var(--muted)}

    /* Alerts */
    .alert{padding:10px 12px;border-radius:8px;margin:10px 0;border:1px solid var(--border)}
    .alert.warn{background:#2a230f;color:#f7e1a1;border-color:#5b4b1c}
    .alert.error{background:#2a1414;color:#ffbdbd;border-color:#5b1c1c}

    /* =========================
     *   Forms & Buttons
     *   ========================= */
    .inline-form{display:flex;gap:10px;margin-top:8px}
    .inline-form input[type=text], .inline-form input[type=search]{
        flex:1;min-width:220px;padding:10px;border:1px solid var(--border);
        border-radius:8px;background:#0c1017;color:var(--fg)
    }
    .inline-form button, .btn-accent{
        padding:10px 16px;border-radius:8px;border:none;background:var(--accent);
        color:#fff;font-weight:600;cursor:pointer;display:inline-block;text-decoration:none;
        transition:box-shadow .2s, transform .2s, background .2s
    }
    .inline-form button:hover, .btn-accent:hover{
        background:var(--accent-2);box-shadow:0 0 14px rgba(74,163,255,.6);transform:translateY(-2px)
    }

    /* =========================
     *   Special Bits
     *   ========================= */
    /* Center the big IP display inside its card */
    .card .big-ip{
        font-size: 28px;
        font-weight: 700;
        color: var(--accent);
    }
    .ip-row {
        display: flex;
        align-items: center;
        justify-content: center; /* centers both together in the card */
        gap: 12px;               /* space between IP and button */
        margin-top: 10px;
    }
    .copy-btn {
        padding: 6px 12px;
        font-size: 14px;
        line-height: 1.2;
    }

    pre {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
        font-size: 13px;
        line-height: 1.45;
    }
    .faq details {
        margin-bottom: 10px;
        padding: 10px 14px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #11151d;
        cursor: pointer;
    }

    .faq summary {
        font-weight: 600;
        color: var(--accent);
        outline: none;
    }

    .faq p {
        margin: 8px 0 0;
        color: var(--muted);
        font-size: 14px;
    }
    /* ==== Blog grid & cards (namespaced) ==== */
    .blog__header { margin: 0 0 1.25rem; }
    .blog__title { font-size: 1.75rem; margin: 0 0 .25rem; }
    .blog__subtitle { color: var(--muted, #9aa0a6); margin: 0 0 1rem; }
    .blog__empty { color: var(--muted, #9aa0a6); }

    .blog-grid {
        display: grid;
        gap: 1rem;
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    .blog-card {
        position: relative;
        border: 1px solid rgba(255,255,255,.08);
        background: rgba(255,255,255,.02);
        border-radius: 12px;
        padding: 1rem;
        transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    }
    .blog-card:hover {
        transform: translateY(-2px);
        border-color: rgba(104,197,255,.35);
        box-shadow: 0 6px 16px rgba(0,0,0,.25);
    }
    .blog-card__link { position:absolute; inset:0; z-index:1; }
    .blog-card__body { position: relative; z-index: 2; }
    .blog-card__title { font-size: 1.1rem; margin: .35rem 0 .35rem; }
    .blog-card__excerpt { color: var(--muted, #9aa0a6); margin: 0; }
    .blog-card__footer { position: relative; z-index: 2; margin-top: .75rem; display: flex; justify-content: flex-end; }

    .blog-card__meta { color: var(--muted, #9aa0a6); font-size: .9rem; }
    .blog-meta__dot { margin: 0 .4rem; opacity: .6; }
    .blog-tag {
        display: inline-block;
        padding: 0 .5rem;
        line-height: 1.6;
        font-size: .8rem;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 999px;
        margin-right: .35rem;
        background: rgba(255,255,255,.03);
    }

    /* Blog buttons */
    .blog-btn { display: inline-block; padding: .45rem .8rem; border-radius: 8px; text-decoration: none; }
    .blog-btn--ghost { border: 1px solid rgba(255,255,255,.18); background: transparent; }
    .blog-btn--ghost:hover { border-color: rgba(104,197,255,.5); }

    /* Blog post page */
    .blog-post__back a { color: var(--muted, #9aa0a6); text-decoration: none; }
    .blog-post__back a:hover { text-decoration: underline; }
    .blog-post__title { font-size: 2rem; margin: .25rem 0 .25rem; }
    .blog-post__meta { color: var(--muted, #9aa0a6); margin-bottom: 1.25rem; }
    .blog-post__content { line-height: 1.8; max-width: 75ch; }
    .blog-post__content pre {
        background: #0f0f10;
        border: 1px solid rgba(255,255,255,.08);
        border-radius: 10px;
        padding: 1rem;
        overflow: auto;
    }
    .blog-post__content img { max-width: 100%; height: auto; border-radius: 8px; }
    .blog-post__content h2, .blog-post__content h3 { margin-top: 1.4em; }
    .blog-post__hero {
        margin: 1rem 0 2rem;
        border-radius: 12px;
        overflow: hidden;
    }
    .blog-post__hero img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: cover;
    }
    /* Featured image inside blog cards */
    .blog-card__thumb {
        aspect-ratio: 16 / 9;         /* Keeps uniform rectangle */
        overflow: hidden;
        border-radius: 10px;
        margin: -0.25rem -0.25rem 0.75rem;
        background: #111;             /* fallback bg */
    }
    .blog-card__thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;            /* crop instead of squish */
        display: block;
        transition: transform .3s ease;
    }
    .blog-card:hover .blog-card__thumb img {
        transform: scale(1.05);       /* subtle zoom on hover */
    }
    .md-img { max-width:100%; height:auto; display:block; border-radius:8px; }

    /* =========================
     *   Responsive
     *   ========================= */
    @media (max-width:900px){
        .grid.two{grid-template-columns:1fr}
    }
    @media (max-width:800px){
        .header-inner{flex-direction:column;align-items:flex-start;gap:6px}
    }
