
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #12141a;
  --muted: #5a6270;
  --primary: #3a6cff;
  --accent: #7b5bff;
  --border: #e6e8ef;
  --shadow: 0 12px 28px rgba(16,24,40,0.08);
}
[data-theme="dark"] {
  --bg: #0f1320;
  --card: #171b2c;
  --text: #eef2ff;
  --muted: #a0a9c8;
  --primary: #7ea6ff;
  --accent: #b89aff;
  --border: #22263a;
  --shadow: 0 18px 40px rgba(0,0,0,0.35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

header {
  position: sticky; top:0; z-index: 50; backdrop-filter: saturate(140%) blur(6px);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: 1100px; margin: 0 auto; display: flex; align-items:center; justify-content: space-between; padding: 14px 20px;
}
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; color: var(--text); font-weight: 700; letter-spacing: .2px; }
.brand img { width:36px; height:36px; }
.nav-links { display:flex; align-items:center; gap:16px; }
.nav-links a { text-decoration:none; color: var(--muted); padding:8px 10px; border-radius:8px; transition: color .2s ease, background .2s ease; }
.nav-links a:hover { color: var(--text); background: color-mix(in srgb, var(--primary) 10%, transparent); }

.toggle { border:1px solid var(--border); background: var(--card); color: var(--text); padding:8px 12px; border-radius: 10px; cursor:pointer; display:flex; align-items:center; gap:8px; box-shadow: var(--shadow); }
.toggle svg { width:18px; height:18px; }

.hero {
  max-width: 1100px; margin: 26px auto 10px; border-radius: 16px; overflow:hidden; box-shadow: var(--shadow);
}
.hero img { width:100%; display:block; animation: fadeIn .8s ease both; }

.wrap { max-width:1100px; margin: 0 auto; padding: 0 20px 40px; }

.grid { display:grid; grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--card); border:1px solid var(--border); border-radius: 14px; overflow:hidden; box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0,0,0,0.18); }
.card img { width:100%; display:block; aspect-ratio: 16/9; object-fit: cover; }
.card .pad { padding: 14px 14px 18px; }
.card h3 { margin: 6px 0 6px; font-size: 1.05rem; }
.meta { font-size: .9rem; color: var(--muted); }
.excerpt { font-size: .96rem; color: var(--muted); margin-top:8px; }

footer { border-top: 1px solid var(--border); margin-top: 40px; }
.foot-inner { max-width:1100px; margin:0 auto; padding:18px 20px; color: var(--muted); }

article { background: var(--card); border:1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
article h1 { margin-top:6px; }
.post-hero { overflow:hidden; border-radius: 12px; margin: 12px 0 18px; }
.post-hero img { width:100%; display:block; animation: fadeInUp .6s ease both; }
.back { display:inline-block; text-decoration:none; color: var(--text); border:1px solid var(--border); padding:8px 12px; border-radius: 10px; margin-top: 10px; transition: background .2s ease; }
.back:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }

@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes fadeInUp { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }
