:root {
    --bg: #0f1115;
    --bg-alt: #161923;
    --text: #eaeaf0;
    --muted: #9296a3;
    --accent: #6ee7b7;
    --border: #262a36;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Only pages using includes/header.php (blog/index.php, blog/post.php) get this —
   admin pages share this stylesheet but don't render the bg-canvas, so they keep
   the solid background above. */
body.site-body {
    background: #05060a;
}
#bg-canvas { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 0; }
.bg-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,.45); z-index: 1; pointer-events: none; }

body.site-body .site-header,
body.site-body main,
body.site-body .site-footer {
    position: relative;
    z-index: 2;
}

body.site-body .site-header {
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(10px) saturate(140%);
    border-bottom: 1px solid rgba(255,255,255,.12);
}

body.site-body .card,
body.site-body .post-item {
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255,255,255,.12);
}

body.site-body .post-body .content {
    background: rgba(255,255,255,.04);
    backdrop-filter: blur(10px) saturate(120%);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius);
    padding: 24px;
}

body.site-body .site-footer {
    background: rgba(255,255,255,.03);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,.12);
}

.wrap { max-width: 860px; margin: 0 auto; padding: 0 20px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { border-bottom: 1px solid var(--border); padding: 18px 0; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 700; color: var(--text); font-size: 1.1rem; }
.site-header nav a { margin-left: 20px; color: var(--muted); font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); }

.hero { padding: 70px 20px 40px; text-align: left; }
.hero h1 { font-size: 2.4rem; margin-bottom: 8px; }
.hero .tagline { color: var(--muted); font-size: 1.15rem; }

.products, .latest-posts, .subscribe { padding: 50px 0; border-top: 1px solid var(--border); }
h2 { font-size: 1.4rem; margin-bottom: 20px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
    display: block;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    color: var(--text);
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card .tag {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 2px 10px;
    margin-bottom: 10px;
}
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.post-list { display: flex; flex-direction: column; gap: 18px; }
.post-item { display: block; padding: 16px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.post-item h3 { margin: 0 0 6px; }
.post-item p { margin: 0 0 6px; color: var(--muted); }
.post-item .date { font-size: 0.85rem; color: var(--muted); }

.subscribe-form { display: flex; gap: 10px; max-width: 420px; }
.subscribe-form input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
.subscribe-form button, table button, form button {
    padding: 10px 18px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #0f1115;
    font-weight: 600;
    cursor: pointer;
}

.muted { color: var(--muted); }

.post-body .content { margin-top: 20px; }
.post-body .content img { max-width: 100%; border-radius: var(--radius); }

.site-footer { border-top: 1px solid var(--border); padding: 30px 0; margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.9rem; }
.socials a { margin-left: 14px; }

@media (max-width: 640px) {
    .site-header .wrap { flex-direction: column; gap: 10px; align-items: flex-start; }
    .site-header nav { display: flex; flex-wrap: wrap; gap: 4px 14px; }
    .site-header nav a { margin-left: 0; }
    .hero { padding: 40px 20px 24px; }
    .hero h1 { font-size: 1.8rem; }
    .hero .tagline { font-size: 1rem; }
    .grid { grid-template-columns: 1fr; }
    .post-item h3 { font-size: 1.05rem; }
    .subscribe-form { flex-direction: column; }
    .subscribe-form input, .subscribe-form button { width: 100%; }
    .site-footer .wrap { flex-direction: column; gap: 10px; text-align: left; }
    .socials { display: flex; flex-wrap: wrap; gap: 12px; }
    .socials a { margin-left: 0; }
    .post-body .content { font-size: 0.95rem; }
    body.site-body .post-body .content { padding: 16px; }
}

textarea, input { font-family: inherit; }
textarea,
input[type=text],
input[type=url],
input[type=email],
input[type=number],
input[type=password],
select {
    padding: 10px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    width: 100%;
}
textarea:focus,
input[type=text]:focus,
input[type=url]:focus,
input[type=email]:focus,
input[type=number]:focus,
input[type=password]:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
}
input[type=file] {
    padding: 8px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
}
input[type=checkbox] { width: auto; accent-color: var(--accent); }
label { display: block; }